Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make bytecode instrumentation user-extensible #3901

Open
tchowice opened this issue Dec 19, 2024 · 0 comments
Open

Make bytecode instrumentation user-extensible #3901

tchowice opened this issue Dec 19, 2024 · 0 comments

Comments

@tchowice
Copy link

tchowice commented Dec 19, 2024

Feature Request

Are you requesting automatic instrumentation for a framework or library? Please describe.

  • Framework or library name : OpenTelemetry.AutoInstrumentation

Is your feature request related to a problem? Please describe.
The .NET AutoInstrumentation agent supports bytecode instrumentation, but this support is currently entirely contained in the AutoInstrumentation itself and does not appear to support user extension. If a user has a internal legacy library that they want to instrument without having to modify the library code, the only way to bytecode-instrument said library is to fork the opentelemtry-dotnet-instrumetation repo, write their own bytecode instrumentation code (via the [InstrumentMethod] attribute), and compile their own copy of the AutoInstrumentation agent, which is highly inconvenient.

Describe the solution you'd like
We would like to see extensibility added to bytecode instrumentation. This extensibility could be implemented in one of the following two ways, or both:

  • Users are able to write their own libraries with [InstrumentMethod] attributes, and define their own integration names. The AutoInstrumentation agent can then be configured to look for these libraries and load up the custom bytecode instrumentations defined within.
  • Users are able to define the autoinstrumentable methods in a JSON/YAML configuration file. The file would define the classes/methods to instrument, and which spans/metrics to create when the methods are called. The AutoInstrumentation agent reads the configuration file instrument the configured methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant