1cbd4c2b77
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/internal/retry Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlpmetric/otlpmetrichttp Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 in /exporters/otlp/otlpmetric/otlpmetrichttp Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /schema Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/zipkin Bump github.com/openzipkin/zipkin-go from 0.4.0 to 0.4.1 in /exporters/zipkin Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /exporters/zipkin Bump google.golang.org/grpc from 1.46.2 to 1.50.1 in /exporters/otlp/otlpmetric/otlpmetricgrpc Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc Bump google.golang.org/grpc from 1.46.2 to 1.50.1 in /exporters/otlp/otlptrace Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 in /exporters/otlp/otlpmetric/otlpmetricgrpc Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlptrace Bump google.golang.org/protobuf from 1.27.1 to 1.28.1 in /exporters/otlp/otlpmetric Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /exporters/otlp/otlptrace Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 in /exporters/otlp/otlptrace Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /exporters/otlp/otlpmetric Bump google.golang.org/grpc from 1.42.0 to 1.50.1 in /exporters/otlp/otlpmetric Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/stdout/stdouttrace Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/prometheus Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 in /exporters/otlp/otlptrace/otlptracegrpc Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlpmetric Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlptrace/otlptracegrpc Bump google.golang.org/grpc from 1.46.2 to 1.50.1 in /exporters/otlp/otlptrace/otlptracegrpc Bump go.uber.org/goleak from 1.1.12 to 1.2.0 in /exporters/otlp/otlptrace/otlptracegrpc Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /exporters/jaeger Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /trace Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/jaeger Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /metric Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlptrace/otlptracehttp Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /trace Co-authored-by: Aneurysm9 <Aneurysm9@users.noreply.github.com> |
||
---|---|---|
.. | ||
internal | ||
otlptracegrpc | ||
otlptracehttp | ||
clients.go | ||
exporter.go | ||
go.mod | ||
go.sum | ||
README.md |
OpenTelemetry-Go OTLP Span Exporter
OpenTelemetry Protocol Exporter implementation.
Installation
go get -u go.opentelemetry.io/otel/exporters/otlp/otlptrace
Examples
otlptrace
The otlptrace
package provides an exporter implementing the OTel span exporter interface.
This exporter is configured using a client satisfying the otlptrace.Client
interface.
This client handles the transformation of data into wire format and the transmission of that data to the collector.
otlptracegrpc
The otlptracegrpc
package implements a client for the span exporter that sends trace telemetry data to the collector using gRPC with protobuf-encoded payloads.
otlptracehttp
The otlptracehttp
package implements a client for the span exporter that sends trace telemetry data to the collector using HTTP with protobuf-encoded payloads.
Configuration
Environment Variables
The following environment variables can be used (instead of options objects) to override the default configuration. For more information about how each of these environment variables is interpreted, see the OpenTelemetry specification.
Environment variable | Option | Default value |
---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT OTEL_EXPORTER_OTLP_TRACES_ENDPOINT |
WithEndpoint WithInsecure |
https://localhost:4317 or https://localhost:4318 1 |
OTEL_EXPORTER_OTLP_CERTIFICATE OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE |
WithTLSClientConfig |
|
OTEL_EXPORTER_OTLP_HEADERS OTEL_EXPORTER_OTLP_TRACES_HEADERS |
WithHeaders |
|
OTEL_EXPORTER_OTLP_COMPRESSION OTEL_EXPORTER_OTLP_TRACES_COMPRESSION |
WithCompression |
|
OTEL_EXPORTER_OTLP_TIMEOUT OTEL_EXPORTER_OTLP_TRACES_TIMEOUT |
WithTimeout |
10s |
Configuration using options have precedence over the environment variables.
-
The gRPC client defaults to
https://localhost:4317
and the HTTP clienthttps://localhost:4318
. ↩︎