diff --git a/website_docs/exporters.md b/website_docs/exporters.md index d527cd343..ddd346c40 100644 --- a/website_docs/exporters.md +++ b/website_docs/exporters.md @@ -7,27 +7,47 @@ weight: 4 In order to visualize and analyze your [traces](/docs/concepts/signals/traces/) and metrics, you will need to export them to a backend. -## OTLP Exporter +## OTLP endpoint -OpenTelemetry Protocol (OTLP) export is available in the -`go.opentelemetry.io/otel/exporters/otlp/otlptrace` and -`go.opentelemetry.io/otel/exporters/otlp/otlpmetric` packages. +To send trace data to an OTLP endpoint (like the [collector](/docs/collector) or +Jaeger >= v1.35.0) you'll want to configure an OTLP exporter that sends to your endpoint. -Please find more documentation on -[GitHub](https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/otlp) +### Using HTTP -## Jaeger Exporter +```go +import ( + "go.opentelemetry.io/otel/exporters/otlp/otlptrace" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" +) -Jaeger export is available in the `go.opentelemetry.io/otel/exporters/jaeger` -package. +func installExportPipeline(ctx context.Context) (func(context.Context) error, error) { + client := otlptracehttp.NewClient() + exporter, err := otlptrace.New(ctx, client) + if err != nil { + return nil, fmt.Errorf("creating OTLP trace exporter: %w", err) + } + /* … */ +} +``` -Please find more documentation on -[GitHub](https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/jaeger) +To learn more on how to use the OTLP HTTP exporter, try out the [otel-collector](https://github.com/open-telemetry/opentelemetry-go/tree/main/example/otel-collector) -## Prometheus Exporter +### Jaeger -Prometheus export is available in the -`go.opentelemetry.io/otel/exporters/prometheus` package. +To try out the OTLP exporter, since v1.35.0 you can run +[Jaeger](https://www.jaegertracing.io/) as an OTLP endpoint and for trace +visualization in a docker container: -Please find more documentation on -[GitHub](https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/prometheus) +```shell +docker run -d --name jaeger \ + -e COLLECTOR_OTLP_ENABLED=true \ + -p 16686:16686 \ + -p 4318:4318 \ + jaegertracing/all-in-one:latest +``` + +## Prometheus + +Prometheus export is available in the `go.opentelemetry.io/otel/exporters/prometheus` package. + +Please find more documentation on [GitHub](https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/prometheus)