fix: Use standard env variables for opentelemtry (#2194)
Opentelemetry defines standard variables which are supported by multiple observability platforms. [1] https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md [2] https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md By defining support for standard env vars, Fission open telemetry support can be leveraged with different platforms such as NewRelic, SigNoz, DataDog etc. Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -11,7 +11,11 @@ import (
|
||||
)
|
||||
|
||||
func TracingEnabled(logger *zap.Logger) bool {
|
||||
openTracingEnabled, err := strconv.ParseBool(os.Getenv("OPENTRACING_ENABLED"))
|
||||
tracingEnabled := os.Getenv("TRACING_ENABLED")
|
||||
if len(tracingEnabled) == 0 {
|
||||
return false
|
||||
}
|
||||
openTracingEnabled, err := strconv.ParseBool(tracingEnabled)
|
||||
if err != nil {
|
||||
if logger != nil {
|
||||
logger.Error("Error parsing OpenTracing enabled flag", zap.Error(err))
|
||||
|
||||
Reference in New Issue
Block a user