open-telemetry / open-telemetry/opentelemetry-java-contrib

[Meta] Support external control of some specific agent behaviours dynamically

Open
#2,416 0 comments 5 reactions 2 assignees View on GitHub

@LikeTheSalad is already working on this.

Since Apr 29, 2026.

component:dynamic-control enhancement
Dominant language
Java
Stars
269
Forks
196
Avg merge
2d 7h
Merged PRs (30d)
38

Description

Component(s)

No response

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

The original issue is https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/12251

Describe the solution you'd like

I am implementing a variety of dynamically controllable behaviours, this issue is the meta issue so that the overall outline and progress are clearer. Note this not a generic reconfiguring of arbitrary agent features/config/capability, this is very specific to control maybe a dozen capabilities in some dynamically adjustable way

  • DONE - New dynamic control project in contrib
  • DONE - Generic OpAMP client capability (not specifically needed for dynamic control, but this should be a supported mechanism)
  • Example using OpAMP client to apply changes dynamically from a remote source
  • Example using a polled properties file to apply changes dynamically from a local source
  • Dynamically adjustable OpAMP polling interval
  • Dynamically adjustable log level
  • Dynamically disabling individual instrumentations
  • Dynamically disabling all instrumentations
  • Dynamically disabling exporting traces
  • Dynamically disabling exporting metrics
  • Dynamically disabling exporting logs
  • DONE - Dynamically adjustable sampling rate (set sampler to ConsistentSampler.parentBased(SAMPLER=ConsistentSampler.updateableProbabilityBased(ratio)) and use SAMPLER.setSamplingProbability(newRatio))
  • DONE - Dynamically disabling inferred spans (changing InferredSpans.setProfilerInterval(duration) to a very large duration is equivalent to disabling, resetting back to the previous duration is re-enabling)
  • Dynamically adjust which methods are instrumented via the "methods" instrumentation (OTEL_INSTRUMENTATION_METHODS_INCLUDE)
  • Provide the dynamic control project as an extension which is configurable to enable any subset of capabilities from the full set, including the two examples (by default all capabilities enabled, with a default local properties file and a default OpAMP body protocol from a default endpoint)
Describe alternatives you've considered

No response

Additional context

No response

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.