Closed jackshirazi closed 2 months ago
This has been discussed in the Otel SIG with 4 approaches: suppression, sampling, re-configuring, retransforming
Note that the agent being enabled is not dynamic in the Elastic agent, and the equivalent OTEL_JAVAAGENT_ENABLED non-dynamic setting is already available. What this actually refers to is recording. Since the instrumentation enabling/disabling is likely to be suppression rather than instrumentation removal, recording on/off in this situation is equivalent to disabling all instrumentation and metrics, so it's dependent on the suppression for part of the feature. A simpler approach is to set sampling to 0, but this also doesn't target metrics, and would leave the agent doing a lot more work than turning all instrumentation off. Metric disablement needs to be considered
This is leaving the agent and instrumentation enabled, but not sending anything to the server (eg to allow log correlation, or trace propagation to continue, but with no data stored for this service). This should be easily done in the exporter?
Available as an extension, but we should customize/do our own implementation and add it as our sampler?
Closing this, next steps covered in https://github.com/elastic/elastic-otel-java/issues/300
This is mainly for tracking, the intention is to enable these in the Otel agent itself rather than in our distribution. The list of features we'd like to be dynamically adjustable are: