[
https://issues.apache.org/jira/browse/SOLR-17432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18123497#comment-18123497
]
ASF subversion and git services commented on SOLR-17432:
--------------------------------------------------------
Commit 22a8cfebbbdb026437d10b0aa47bb66ffdb23a9a in solr's branch
refs/heads/main from David Smiley
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=22a8cfebbbd ]
SOLR-17432: OpenTelemetry init refactor; OTel Java agent support (#2687)
Solr now detects a loaded OpenTelemetry Java agent and uses the OpenTelemetry
it registered, with no need for a <tracerConfig> in solr.xml or the
opentelemetry module. Previously the agent worked only incidentally (with an
ignorable ClassNotFoundException). Underneath, GlobalOpenTelemetry is now set
in exactly one place, which was previously scattered across several classes and
test utilities and hard to reason about.
- OpenTelemetryConfigurator owns initialization, invoked first thing in the
CoreContainer constructor.
- API change: configurators now implement createOpenTelemetry() and must not
set GlobalOpenTelemetry themselves; getTracer() and getOpenTelemetrySdk() are
deprecated. Existing configurators keep working. OtelTracerConfigurator was
updated accordingly, building the SDK without registering it globally.
- Test infrastructure: MiniSolrCloudCluster no longer touches tracing; nodes
initialize OTel the same way production does. SolrTestCase resets OTel after
each class and randomizes the span-recording check for all tests, not just
SolrCloud ones. Span-examining tests use OTel's own OpenTelemetryRule instead
of the custom configurator that worked around tests racing to set the global,
which is removed.
- Ref guide: new dedicated OpenTelemetry page covering the Java agent, the
module, <tracerConfig>, and how to verify which integration is active, so the
tracing and metrics pages don't each re-explain setup.
> Enable use of OTEL Agent
> ------------------------
>
> Key: SOLR-17432
> URL: https://issues.apache.org/jira/browse/SOLR-17432
> Project: Solr
> Issue Type: Improvement
> Components: tracing
> Reporter: David Smiley
> Assignee: David Smiley
> Priority: Major
> Labels: pull-request-available
> Time Spent: 5h 40m
> Remaining Estimate: 0h
>
> The [OpenTelemetry Java Agent
> |https://opentelemetry.io/docs/zero-code/java/agent/]is really powerful,
> supporting {{WithSpan}} annotations and auto-instrumentation of many
> libraries like the AWS SDK. It also isolates its transitive dependencies in
> another classloader so as not to conflict with Solr's choices. Solr
> currently only supports OTEL via Solr itself calling into OTEL to initialize.
> This ticket proposes _also_ supporting recognizing that the OTEL agent is
> loaded, and if so then using that without any change to solr.xml.
> Without this, someone can write a trivial TracerConfigurator and configure it
> in solr.xml but ideally Solr should detect the situation. If you want to run
> tests with tracing (an overlooked use of tracing!), it's annoying to go touch
> the pertinent solr.xml.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]