Skip to content

Making "methods" instrumentation dynamically updateable #15228

@jackshirazi

Description

@jackshirazi

Is your feature request related to a problem? Please describe.

An API that let's the methods instrumentation have methods instrumented at runtime, and also have any existing method instrumentation disabled at runtime
Conceptually, I think 3 API methods, like

  • listCurrentInstrumentedMethods
  • instrumentMethod(class, method, maybe spankind)
  • disableInstrumentedMethod(class, method)

Describe the solution you'd like

Ideally it's just changes in the method instrumentation. But it would need to be accessible from an extension, which means that I think I need to add an interface to the javaagent-bootstrap module, and I'm not sure how acceptable that is. Or are there other ways to make the internal APIs available externally?

Describe alternatives you've considered

An alternative is to reimplement the full instrumentation as an extension and only have that dyamically updateable, leaving the existing one static and using the env var to determine which methods were instrumented so that the new one doesn't try to duplicate instrumentation on those. In some ways, this is the cleaner option, even though it's duplication of code

Additional context

part of open-telemetry/opentelemetry-java-contrib#2416

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestneeds triageNew issue that requires triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions