OpenTelemetry Go Helper
Purpose
The OpenTelemetry Go Helper makes it possible to switch easily between OpenTelemetry exporters, currently the Dynatrace Exporter and the stdout exporter (more to come). Currently, only metrics are supported.
Getting started
go get github.com/dynatrace/opentelemetry-go-helper/helper
Usage (in Code)
import (
otelhelper "github.com/dynatrace/opentelemetry-go-helper/helper"
)
func main() {
pusher := otelhelper.CreatePusher()
defer pusher.Stop()
}
Configuration (Environment Variables)
stdout Exporter
OTEL_PROVIDER=stdout
Dynatrace OpenTelemetry Exporter
OTEL_PROVIDER=dynatrace
DT_URL=<Dynatrace API URL, e.g. https://mytenantid.live.dynatrace.com/api/v2/ingest>
DT_API_KEY=<Dynatrace API Key>
Disclaimer
The contained code is NOT SUPPORTED by Dynatrace.
Please use at your own risk. You can contact the author via Github issues.
License
The OpenTelemetry Go Helper is under Apache 2.0 license. See LICENSE for details.