-
I want to undestand how we get the loggingbuilder here: https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/src/OpenTelemetry.AutoInstrumentation/Instrumentations/Logger/LoggingBuilderIntegration.cs? Can I generalise this and implement a similar class for getting WebApplicationBuilder whenever it gets called? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I think that you should start with reading this document https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docs/design.md#bytecode-instrumentation Especially "Bytecode instrumentation" section. What is your use case? What do you want to do with WebApplicationBuilder? |
Beta Was this translation helpful? Give feedback.
Sorry. I do not understand the use case. Could you please be more descriptive?
In general with monkey-patching aka bytecode changes you can do anything with the code, but is it not for free. If possible you should avoid it as it reduce performance/optimisations.