opentelemetry-dotnet-instrumentation
opentelemetry-dotnet-instrumentation copied to clipboard
[Question] Does Automatic Instrumentation handle cases when tracing-related dependencies are not added to .csproj?
This is a question regarding a specific use-case and if the automatic instrumentation technique supports it. If my ASP.Net application does not reference any tracing related libraries (i.e. OpenTelemetry SDK
, OpenTracing
, DiagnosticsSource
, Logging.Extensions
, etc.) will the automatic instrumentation handle this case, by copying over the necessary DLLs, their child dependencies, and capture incoming and outgoing HTTP messages?
Just wanted to clarify this because all the examples provided include some or all of the above dependencies in their .csproj
files.
Thanks!😄
TL;DR; Yes. In case of problems look at the troubleshooting docs.
The automatic instrumentation binaries should contain all needed references. They should be automatically loaded when needed. However, there are a few cases when dependencies must be manually provided; see:
Please let us know if the provided information is helpful. Feel free to ask more questions if needed. Finally, close the issue if you do not need any more help at the moment 😉
Thank you @pellared 😄 Closing this issue as no other questions (for now 😉 ).
Re-opening this to ask a follow up question (would be happy to move it to a new issue if needed)
Is it possible to enable automatic aspnet
instrumentation, without having to modify the Web.config
or applicationHost.config
files to add the TelemetryHttpModule
dependency?
Just thinking out loud - there are certain ways to programmatically register HTTP Modules - like here where they use a PreApplicationStartMethod
attribute; do you think a solution like the one described here might be added in this library to automate the registration of TelemetryHttpModule
as well?
So far our discussions have only covered what you can see in #689. We are currently focusing on addressing other instrumentation gaps and usability issues, but we welcome any thoughts, ideas, or prototypes that you may have on the subject.
Closing for now, please rise new ticket if we can help.