Configuring collector

Prerequisites

Before sending OpenTelemetry data to the SixthSense platform, ensure you have the following:

  • SixthSense Collector URL

    • This URL will be provided by SixthSense Customer Support.
    • Separate URLs may be provided for gRPC and HTTP endpoints.
  • Access Token To get the token, see Accessing your Access Token.

Recommended approaches for sending OpenTelemetry data

The following approaches are recommended for sending OpenTelemetry data to the SixthSense platform:

  • Directly from Agents/SDKs

Configure your OpenTelemetry data source to send data to the SixthSense endpoint using the native OpenTelemetry Protocol (OTLP). OTLP is an open-source, vendor-agnostic gRPC-based protocol for sending telemetry data.

  • Through OpenTelemetry Collector

Configure the OpenTelemetry Collector to forward telemetry data to the SixthSense platform using the OTLP exporter. For more information, see Configuring Open Telmetry Connector

Configuring Agents/SDKs

Set the following environment variables to enable data transmission from OpenTelemetry agents/SDKs:

VariableDescriptionDefault/Example
OTEL_EXPORTER_OTLP_ENDPOINTThe OTLP gRPC or HTTP endpoint for SixthSense.<sixthsense_url>
OTEL_EXPORTER_OTLP_HEADERSAuthentication headers for OTLP exportx-access-token=<your_access_token>
OTEL_METRIC_EXPORT_INTERVALSets the metric export interval in milliseconds.60000 (60 seconds)
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCEDefines metric temporality. Configure metrics temporality preference to delta, as supported by SixthSenseDELTA
OTEL_EXPORTER_OTLP_COMPRESSIONCompression for OTLP data transmission. Options: none, gzip.none
OTEL_SERVICE_NAMEA custom name for your service/application to identify telemetry data in SixthSense.otel-service
OTEL_EXPORTER_OTLP_PROTOCOLProtocol for data transmission. Options: grpc (default), http/protobuf.grpc
note

To use HTTP instead of the default gRPC protocol, configure the following environment variables:

OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT=<sixthsense_http_url>

Replace <sixthsense_http_url> with the HTTP endpoint URL provided by Customer Support.

Sample Environment Variables:

export OTEL_SERVICE_NAME=otel-service
export OTEL_METRIC_EXPORT_INTERVAL=60000
export OTEL_EXPORTER_OTLP_ENDPOINT=<sixthsense_grpc_url>
export OTEL_EXPORTER_OTLP_HEADERS="x-access-token=<token>"
export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta

Configuring OpenTelemetry Collector

For configuring OTel collector, add exporters for sending the traces and metrics, update the otel-config.yml file.

  1. Define OTLP Exporters

Add exporters for gRPC or HTTP in the otel-config.yml file.

gRPC Exporter:

exporters:
otlp/2: # Exporter for gRPC protocol
endpoint: <sixthsense_grpc_url>
headers:
x-access-token: <your_access_token>
compression: none

HTTP Exporter Configuration:

To use HTTP instead of gRPC, configure the otlphttp exporter as follows:

exporters:
otlphttp: # Exporter for HTTP/Protobuf
endpoint: <sixthsense_http_url>
headers:
x-access-token: <your_access_token>
compression: none
  1. Configure Pipelines

Add the defined exporters to the pipelines section of the otel-config.yml file.

If using GRPC:

service:
pipelines:
traces: # Pipeline for trace data
receivers: [otlp]
processors: [batch]
exporters: [otlp/2] # Sends traces via gRPC
metrics: # Pipeline for metrics data
receivers: [otlp]
processors: [batch]
exporters: [otlp/2]

If using http:

service:
pipelines:
traces: # Pipeline for trace data
receivers: [otlp]
processors: [batch]
exporters: [otlphttp] # Sends traces via gRPC
metrics: # Pipeline for metrics data
receivers: [otlp]
processors: [batch]
exporters: [otlphttp]
Important: Do not use both gRPC and HTTP exporters simultaneously. Choose one method based on your preference or requirements.

Example of otel-config.yml

Below is a complete example where the traces are exported over gRPC.

receivers:
otlp:
protocols:
grpc: # Receives telemetry data over gRPC
http: # Receives telemetry data over HTTP
processors:
batch: # Batch processor to group telemetry data before export
exporters:
otlp/2: # gRPC exporter for trace data
endpoint: <sixthsense_grpc_url>
headers:
x-access-token: <your_access_token>
compression: none
service:
pipelines:
traces: # Pipeline for traces
receivers: [otlp]
processors: [batch]
exporters: [otlp/2] # Exports traces via gRPC
metrics: # Pipeline for metrics
receivers: [otlp]
processors: [batch]
exporters: [otlp/2] # Exports metrics via HTTP

Summary

Key Configuration Points

  1. Agent/SDK Configuration

Set environment variables for OTLP endpoint, access token, and optional parameters like metric interval and protocol.

  1. Collector Configuration

Configure exporters (either gRPC or HTTP) and add them to the service pipelines for traces and metrics.

  1. Authentication

Always include the x-access-token header for authentication.

  1. Protocol Choice

gRPC is generally recommended for better performance. Use HTTP only if necessary.

  1. Metric Temporality

Use DELTA for metrics, as this is the recommended temporality by SixthSense.

If you encounter any issues, or for further assistance, please reach out to SixthSense Customer Support.