mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-05 22:54:18 +02:00
c6b92d5b20
* Make TraceFlags spec-compliant * Remove `trace.FlagsDebug` and `trace.FlagsDeferred` * These are used only by the B3 propagator and will be handled there in the `context.Context` * Make `trace.TraceFlags` a defined type, aliasing `byte` * Move `IsSampled` method from `trace.SpanContext` to `trace.TraceFlags` * Add `Sampled(bool)` method to `trace.TraceFlags` * Implement `Stringer` and `json.Marshaler` for `trace.TraceFlags` Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com> * Rename `TraceFlags.Sampled()` to `TraceFlags.WithSampled()` for consistency * Restore `SpanContext.IsSampled()` method. Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com> |
||
---|---|---|
.. | ||
internal | ||
otlpgrpc | ||
otlphttp | ||
doc.go | ||
example_test.go | ||
go.mod | ||
go.sum | ||
options.go | ||
otlp_metric_test.go | ||
otlp_span_test.go | ||
otlp_test.go | ||
otlp.go | ||
protocoldriver.go | ||
README.md |
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.