You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deploying to a shared environment, it's possible that the system's environment variables are polluted with other application's OTel configuration that could cause issue during the exporter initialization. For example:
OTEL_RESOURCE_ATTRIBUTES may include extra values not desired in the application's attribute configuration
Problem Statement
When deploying to a shared environment, it's possible that the system's environment variables are polluted with other application's OTel configuration that could cause issue during the exporter initialization. For example:
OTEL_RESOURCE_ATTRIBUTES
may include extra values not desired in the application's attribute configurationOTEL_EXPORTER_OTLP_ENDPOINT
might set the protocol tohttp
(insecure), which the SDK currently provides no mechanism to override back to secure (see otlp.ExporterOption WithInsecure should take a boolean parameter. #1344)Proposed Solution
otlptracehttp.New
orotlpmetrichttp.New
(->NewWithoutEnv
) which do not read from the environmentWithEnvironment
,WithDefault
?WithoutEnv
Alternatives
Currently the only alternative I've found is to call
os.Unsetenv
and explicitly remove the polluting environment variablesPrior Art
The
resource
APIs currently offer a means to initialize without inheriting values from the Environment.resource.Default
uses the environment, or when creating a resource explicitly one can useresource.WithFromEnv()
Additional Context
n/a
The text was updated successfully, but these errors were encountered: