1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00
opentelemetry-go/exporters/otlp/otlptrace
Koichi Shiraishi be7539e30d
exporters/otlp/otlptrace/otlptracegrpc: remove unnecessary comment (#4224)
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2023-06-20 14:24:25 +02:00
..
internal [chore] Pin otel-specification hyperlinks (#4033) 2023-05-09 08:45:39 -07:00
otlptracegrpc exporters/otlp/otlptrace/otlptracegrpc: remove unnecessary comment (#4224) 2023-06-20 14:24:25 +02:00
otlptracehttp dependabot updates Tue Jun 20 09:20:10 UTC 2023 (#4240) 2023-06-20 11:38:28 +02:00
clients.go Interface stability documentation (#2012) 2021-06-18 07:56:11 -07:00
exporter_test.go OTLP traces export errors use a consistent error message prefix (#3516) 2023-01-27 10:42:15 -08:00
exporter.go OTLP traces export errors use a consistent error message prefix (#3516) 2023-01-27 10:42:15 -08:00
go.mod dependabot updates Tue Jun 20 09:20:10 UTC 2023 (#4240) 2023-06-20 11:38:28 +02:00
go.sum dependabot updates Tue Jun 20 09:20:10 UTC 2023 (#4240) 2023-06-20 11:38:28 +02:00
README.md [chore] Pin otel-specification hyperlinks (#4033) 2023-05-09 08:45:39 -07:00
version_test.go Add Version func to otlpmetric and otlptrace (#3956) 2023-04-10 14:19:49 -07:00
version.go Release v1.16.0/v0.39.0 -- Stable Metric API (#4100) 2023-05-22 12:06:21 -07:00

OpenTelemetry-Go OTLP Span Exporter

Go Reference

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:43181
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.


  1. The gRPC client defaults to https://localhost:4317 and the HTTP client https://localhost:4318. ↩︎