Option to suppress controller and view spans - #3865
Conversation
|
I explored using the new "instrumentation type" for this suppression, but I think the instrumentation type is nicely scoped to semantic conventions, and so this doesn't quite fit. And since there's not semantic conventions, or semantic convention attribute extractors for controllers and views, there's no way to auto-detect the instrumentation type in this case. An open question I have is that it might be nicer to have a "noop" Instrumenter that can be used, instead of having |
|
I went ahead and applied to all existing Instrumenters to get a fuller picture |
…ess-internal-spans
|
|
||
| private static final boolean SUPPRESS_CONTROLLER_SPANS = | ||
| Config.get() | ||
| .getBoolean("otel.instrumentation.common.experimental.suppress-controller-spans", false); |
There was a problem hiding this comment.
We should somehow have this in the javaagent-api artifact rather than copying into every module I guess. Either a method on Config or something like JavaAgentConfig with all of them exposed rather than using the flags directly.
| // lazy initialized, so that javaagent can set it, and library instrumentation can fall back and | ||
| // read system properties | ||
| @Nullable private static ExperimentalConfig instance = null; |
There was a problem hiding this comment.
That's not true for this class - I think we can safely use a static final instance. It is Config that needs to have lazy initialization, because it's "real" instance is being set by the agent.
…ess-internal-spans
…ess-internal-spans
Introduces two new options:
otel.instrumentation.common.experimental.suppress-controller-spansotel.instrumentation.common.experimental.suppress-view-spansto suppress the controller and view spans.