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
  • OODLE_API_KEY: Your Oodle API key for authentication

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>"

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),
)

Support

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

  • The help chat widget in the bottom-right corner of this page
  • Email at support@oodle.ai