Carl 0075ad0f6c Feature #TASK_QT-18250 中央国债验证POC 11 kuukautta sitten
..
internal 89db04099d Fixed #TASK_GK-2944 trace add otel 2 vuotta sitten
otlptracegrpc 85479c4bae Fixed #TASK_QT-9810 对接日志 1 vuosi sitten
otlptracehttp 0075ad0f6c Feature #TASK_QT-18250 中央国债验证POC 10 kuukautta sitten
README.md 89db04099d Fixed #TASK_GK-2944 trace add otel 2 vuotta sitten
apm_exporter.go 1d54188273 Feature #TASK_QT-18250 容器化&golang适配 1 vuosi sitten
clients.go 26c49c2f4b Fixed #TASK_QT-9810 topic适配 1 vuosi sitten
exporter.go 26c49c2f4b Fixed #TASK_QT-9810 topic适配 1 vuosi sitten
exporter_test.go 89db04099d Fixed #TASK_GK-2944 trace add otel 2 vuotta sitten
go.mod b2e347b2f0 Fixed #TASK_QT-9810 增加jvm版本号限制1.8.x 1 vuosi sitten
go.sum b2e347b2f0 Fixed #TASK_QT-9810 增加jvm版本号限制1.8.x 1 vuosi sitten
version.go 89db04099d Fixed #TASK_GK-2944 trace add otel 2 vuotta sitten
version_test.go 89db04099d Fixed #TASK_GK-2944 trace add otel 2 vuotta sitten

README.md

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

[^1]: The gRPC client defaults to https://localhost:4317 and the HTTP client https://localhost:4318.

Configuration using options have precedence over the environment variables.