opentelemetry-dotnet
opentelemetry-dotnet copied to clipboard
Environment Variables to align with other OpenTelemetry SDKs
Feature Request
Is your feature request related to a problem?
We are using opentelemetry to auto instrument some prepackaged applications that we don't have the ability to instrument the code base. We have some headers that are being sent that would be valuable for us to be able to have added to the spans via environment variables like other libraries have currently. (OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS)
Describe the solution you'd like:
Allow environment variables to be set to capture http headers. OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS is an example but referencing the java agent configuration
Describe alternatives you've considered.
Other monitoring solutions?
Additional Context
In the dotnet instrumentation repo I opened up an issue and was redirected here #2874
I'm trying some proofs of concept with OpenTelemetry .NET Automatic Instrumentation and this would be really useful, for example to be able to display database statements by enabling the option via environment variable, without requiring changes in our application code like this: https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Instrumentation.SqlClient#advanced-configuration
Similar as requested here if I'm not mistaken: open-telemetry/opentelemetry-dotnet-contrib#1770 Thanks
The env var should have a OTEL_DOTNET_ prefix. Reference https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#language-specific-environment-variables
@pellared Is there an env var for db statement?
This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.
Closed as inactive. Feel free to reopen if this issue is still a concern.