mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-26 03:52:03 +02:00
97501a3fee
* Update SpanSnapshot to use parent SpanContext Having only the parent span ID and a separate field to communicate if the parent was remote does not provide a comprehensive view of the parent span nor is it an efficient way to transmit this information. Update the SpanSnapshot to have a `Parent` field that contains the parent span context. This field replaces the ParentSpanID and HasRemoteParent fields. * Revert SamplingParameters span change * Update CHANGELOG with PR number
OpenTelemetry Collector Go Exporter
This exporter exports OpenTelemetry spans and metrics to the OpenTelemetry Collector.
Installation and Setup
The exporter can be installed using standard go
functionality.
$ go get -u go.opentelemetry.io/otel/exporters/otlp
A new exporter can be created using the NewExporter
function.
Retries
The exporter will not, by default, retry failed requests to the collector. However, it is configured in a way that it can be easily enabled.
To enable retries, the GRPC_GO_RETRY
environment variable needs to be set to on
. For example,
GRPC_GO_RETRY=on go run .
The default service config used by default is defined to retry failed requests with exponential backoff (0.3seconds * (2)^retry
) with a max of 5
retries).
These retries are only attempted for reponses that are deemed "retry-able" by the collector.