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:
@@ -18,6 +18,7 @@ import (
|
||||
fv1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"github.com/fission/fission/pkg/fetcher"
|
||||
"github.com/fission/fission/pkg/utils"
|
||||
"github.com/fission/fission/pkg/utils/otel"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@@ -283,16 +284,7 @@ func (cfg *Config) addFetcherToPodSpecWithCommand(podSpec *apiv1.PodSpec, mainCo
|
||||
},
|
||||
},
|
||||
},
|
||||
Env: []apiv1.EnvVar{
|
||||
{
|
||||
Name: "OPENTRACING_ENABLED",
|
||||
Value: os.Getenv("OPENTRACING_ENABLED"),
|
||||
},
|
||||
{
|
||||
Name: "OTEL_COLLECTOR_ENDPOINT",
|
||||
Value: os.Getenv("OTEL_COLLECTOR_ENDPOINT"),
|
||||
},
|
||||
},
|
||||
Env: otel.OtelEnvForContainer(),
|
||||
}
|
||||
|
||||
// Pod is removed from endpoints list for service when it's
|
||||
|
||||
Reference in New Issue
Block a user