[
https://issues.apache.org/jira/browse/SOLR-16205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17540145#comment-17540145
]
Jason Gerlowski commented on SOLR-16205:
----------------------------------------
Alright, that's my preference as well, just wanted to make sure it wasn't "load
bearing" performance-wise before I take it out. Thanks for weighing in!
It might still make sense to give the Api interface some notion of what level
they're registered at (global vs core), but I'd rather punt on that for now
until we see another need for it rather than complicate things.
I've opened up a PR and will merge it after the weekend as long as test runs
look good.
> Span operationName for v2 APIs should include collection/core names
> -------------------------------------------------------------------
>
> Key: SOLR-16205
> URL: https://issues.apache.org/jira/browse/SOLR-16205
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: v2 API
> Affects Versions: 9.0
> Reporter: Jason Gerlowski
> Priority: Minor
>
> HttpSolrCall and V2HttpSolrCall are responsible for populating the
> opentracing "spans" that track individual API calls. A big piece of this is
> assigning each span an "operationName", which typically consists of a HTTP
> verb and a normalized copy of the URL path (separated by a colon).
> It looks like the intention is that these URL paths should be complete. i.e.
> They're not just the request handler name or whatever follows the collection
> name, but the full URL path.
> But for some AnnotatedApis, we do end up using an incomplete path.
> The [span population
> logic|https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/api/V2HttpCall.java#L429]
> for v2 APIs has a special check for AA instances - if the API call in
> question is an AA, we grab the first path off the AA "Endpoint" as a shortcut
> to save us the work of joining and normalizing each of the path segments held
> by the HttpSolrCall/V2HttpCall.
> This works great for AA's registered at the CoreContainer level: the
> annotations for those AA's include the full path (e.g.
> [ReloadCollectionAPI|https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/handler/admin/api/ReloadCollectionAPI.java]).
> But this _isn't_ the case for AA's registered at the individual-core level,
> the annotations on these AA's only includes the path segments that follows
> the core/collection name. (e.g.
> [RealTimeGetAPI|https://github.com/apache/solr/blob/main/solr/core/src/java/org/apache/solr/handler/admin/api/RealTimeGetAPI.java#L42]).
> As a result, core-level AA's produce spans with operationName's like
> {{get:/get}}, instead of the fuller {{get:/c/\{collection\}/get}}.
> I'm not sure this is a huge deal either way, but it'd be a nice consistency
> thing to straighten out.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]