Debian Codegraph @

exporters/zipkin/env.go

raw
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 package zipkin // import "go.opentelemetry.io/otel/exporters/zipkin"
5
6 import "os"
7
8 // Environment variable names.
9 const (
10 // Endpoint for Zipkin collector.
11 envEndpoint = "OTEL_EXPORTER_ZIPKIN_ENDPOINT"
12 )
13
14 // envOr returns an env variable's value if it is exists or the default if not.
15 func envOr(key, defaultValue string) string {
16 if v := os.Getenv(key); v != "" {
17 return v
18 }
19 return defaultValue
20 }