1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-26 21:05:00 +02:00
opentelemetry-go/exporters/zipkin/env.go
2024-02-29 07:05:28 +01:00

21 lines
484 B
Go

// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package zipkin // import "go.opentelemetry.io/otel/exporters/zipkin"
import "os"
// Environment variable names.
const (
// Endpoint for Zipkin collector.
envEndpoint = "OTEL_EXPORTER_ZIPKIN_ENDPOINT"
)
// envOr returns an env variable's value if it is exists or the default if not.
func envOr(key, defaultValue string) string {
if v := os.Getenv(key); v != "" {
return v
}
return defaultValue
}