Skip to content

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

@jackshirazi

Description

@jackshirazi

Component(s)

No response

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

The original issue is open-telemetry/opentelemetry-java-instrumentation#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

  • 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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions