mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-26 03:52:03 +02:00
3560dc5959
Bump github.com/golangci/golangci-lint from 1.55.1 to 1.55.2 in /internal/tools Bump golang.org/x/sys from 0.13.0 to 0.14.0 in /sdk
OpenTelemetry-Go OTLP Metric HTTP Exporter
OpenTelemetry Protocol Exporter implementation using HTTP with protobuf-encoded payloads.
Installation
go get -u go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
Usage
Exporters should be created using the New and used with a [PeriodicReader].
Environment Variables
The following environment variables can be used (instead of options objects) to override the default configuration.
Name | Description | Default | Override with |
---|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT |
Endpoint to which the exporter is going to send traces or metrics. If the scheme is http or unix this will also set OTEL_EXPORTER_OTLP_INSECURE to true |
https://localhost:4317 |
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT , WithEndpoint() |
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT |
Endpoint to which the exporter is going to send metrics. If the scheme is http or unix this will also set OTEL_EXPORTER_OTLP_INSECURE to true |
https://localhost:4317/v1/metrics |
WithEndpoint() and WithURLPath() |
OTEL_EXPORTER_OTLP_INSECURE |
If set to true the connection will not attempt to use TLS when connecting | false |
OTEL_EXPORTER_OTLP_METRICS_INSECURE , WithInsecure() |
OTEL_EXPORTER_OTLP_METRICS_INSECURE |
If set to true the connection will not attempt to use TLS when connecting | false |
WithInsecure() |
OTEL_EXPORTER_OTLP_HEADERS |
A list of headers to send with each request | none | OTEL_EXPORTER_OTLP_METRICS_HEADERS , WithHeaders() |
OTEL_EXPORTER_OTLP_METRICS_HEADERS |
A list of headers to send with each request | none | WithHeaders() |
OTEL_EXPORTER_OTLP_COMPRESSION |
Sets the compressions used in the connection. Supports none and gzip . Must import the compressor for gzip to work. |
none | OTEL_EXPORTER_OTLP_METRICS_COMPRESSION , WithCompression() |
OTEL_EXPORTER_OTLP_METRICS_COMPRESSION |
Sets the compressions used in the connection. Supports none and gzip . Must import the compressor for gzip to work. |
none | WithCompression() |
OTEL_EXPORTER_OTLP_TIMEOUT |
Sets the max amount of time (as milliseconds) an Exporter will attempt an export | 10000 |
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT , WithTimeout() |
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT |
Sets the max amount of time (as milliseconds) an Exporter will attempt an export | 10000 |
WithTimeout() |
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE |
The aggregation temporality to use on the basis of instrument kind. Available values are Cumulative , Delta , and LowMemory . See The OTLP Exporter Specification for more details |
Cumulative |
WithTemporalitySelector() |