Skip to main content

Open Telemetry

Oodle provides a seamless integration with Open Telemetry. By adding Oodle as an exporter in your Open Telemetry configuration, you can start sending traces directly to Oodle.

To send traces to Oodle via Open Telemetry, you will need the following:

  • OODLE_INSTANCE: Your Oodle instance ID. Go to Settings icon -> API Keys page in your Oodle UI to find out. (Oodle UI links: ap1, us1)
  • OODLE_API_KEY: Your Oodle API key for authentication. Go to Settings icon -> API Keys in your Oodle UI to choose an appropriate key. (Oodle UI links: ap1, us1)

Open Telemetry Collector Configuration

If you have set up an Open Telemetry Collector, you can add an exporter for Oodle to your Open Telemetry configuration file:

exporters:
otlphttp/oodle:
traces_endpoint: "https://<OODLE_INSTANCE>.collector.oodle.ai/v1/otlp/traces"
headers:
"X-OODLE-INSTANCE": "<OODLE_INSTANCE>"
"X-API-KEY": "<OODLE_API_KEY>"

Steps

OpenTelemetry Integration

You can find the Open Telemetry config changes by following these steps:

  1. Login to the Oodle UI, then navigate to Settings page
  2. Click on the Open Telemetry tile
  3. Choose an appropriate API key from the list on top of the drawer
  4. Ensure that you have selected the Traces feature in Step 1.

Follow the steps in the drawer to complete the OpenTelemetry collector configuration for Traces

OTel SDK Configuration

If you are using an Open Telemetry SDK, and have exporters configured directly in your application, you can add the Oodle exporter via the SDK:

import (
// other imports ...
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
"go.opentelemetry.io/otel/sdk/trace"
// other imports ...
)

existingTraceExporter, err := otlptracehttp.New(
// initialization ...
)
if err != nil {
panic("...")
}

oodleTraceExporter, err := otlptracehttp.New(
ctx,
otlptracehttp.WithEndpoint("<OODLE_INSTANCE>.collector.oodle.ai"),
otlptracehttp.WithURLPath("v1/otlp/traces"),
otlptracehttp.WithHeaders(map[string]string{
"X-OODLE-INSTANCE": "<OODLE_INSTANCE>",
"X-API-KEY": "<OODLE_API_KEY>",
}),
)
if err != nil {
panic("failed to initialize Oodle trace exporter")
}

traceProvider := trace.NewTracerProvider(
trace.WithSpanProcessor(
trace.NewBatchSpanProcessor(existingTraceExporter),
),
trace.WithSpanProcessor(
trace.NewBatchSpanProcessor(oodleTraceExporter),
),
trace.WithSampler(sampler),
trace.WithResource(res),
)

Custom Resource Attributes

Oodle UI provides additional conveniences to filter spans by the following resource attributes:

The Open Telemetry collector can add custom resource attributes to each event via the resource processor. In addition, Oodle supports custom resource attributes sent via the X-RESOURCE-ATTRS HTTP header.

The example below adds two resource attributes: k8s.cluster.name and deployment.environment.name.

processors:
resource/oodle:
attributes:
- key: k8s.cluster.name
value: <CLUSTER>
action: insert
- key: deployment.environment.name
value: <ENV>
action: insert

exporters:
otlphttp/oodle:
traces_endpoint: "https://<OODLE_INSTANCE>.collector.oodle.ai/v1/otlp/traces"
headers:
"X-OODLE-INSTANCE": "<OODLE_INSTANCE>"
"X-API-KEY": "<OODLE_API_KEY>"

service:
pipelines:
traces:
processors: [resource/oodle]
exporters: [otlphttp/oodle]

Support

If you need assistance or have any questions, please reach out to us through:

  • The help chat widget available on the Support link in the sidebar
  • Email at support@oodle.ai