Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-15367 [9.x] Convert "rid" functionality into a default Tracer #1868

Merged
merged 7 commits into from
Sep 7, 2023

Conversation

stillalex
Copy link
Member

@stillalex stillalex commented Aug 28, 2023

https://issues.apache.org/jira/browse/SOLR-15367

Description

PR for 9.x branch
This is a 9.x version of #1854 for evaluation.

Almost all changes relevant to OpenTracing are in SimplePropagator. I made an effort to minimize changes that are not on main branch. ideally we'd reach a state where this has working basic generation of traces and remains frozen on 9.x until 10.x starts releasing and everyone transitions automatically to the new OTEL-based impl.

Similar to main branch, this is enabled by default. this could be an issue for setups that already have tracing enabled, so I am ok with off by default if switching this off via system property is too much to handle in a minor upgrade.

Solution

Please provide a short description of the approach taken to implement your solution.

Tests

Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

@stillalex stillalex requested a review from dsmiley August 28, 2023 19:32
@stillalex
Copy link
Member Author

@dsmiley raising this PR for a discussion on building an OpenTracing version of the always-on tracer that went into main branch based on OTEL.

Copy link
Contributor

@dsmiley dsmiley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bringing this to 9!

Comment on lines 91 to 99
if (!format.equals(Format.Builtin.HTTP_HEADERS)) {
throw new IllegalArgumentException("unsupported format " + format);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this constraint necessary? What if we inject & extract to transfer to the Overseer? (I have done this at work)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly not sure how to approach this so it works on a generic case. I will return change to early in case this is not a known format (the one Solr sets up) instead of throwing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In practice at the moment, the format will always be HTTP since we control where we inject. But if we get to add the Overseer as you have done in main branch, then it will mysteriously not propagate, and then maybe we'll "fix" it by removing these 3 lines. I don't think need to care about what the format is; just try to inject best-effort.

Copy link
Member Author

@stillalex stillalex Sep 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think need to care about what the format is; just try to inject best-effort.

I agree. the inject is easy enough, you just return early. the extract is now a return NoopSpan.INSTANCE.context(); and this I'm not sure will work correctly.
not having some basic test coverage for this setup worries me a bit.

@stillalex stillalex force-pushed the SOLR-15367-9x-tracer branch from b640bb6 to f3cb607 Compare September 6, 2023 23:15
@stillalex stillalex force-pushed the SOLR-15367-9x-tracer branch from c7123a8 to 3eb477e Compare September 7, 2023 04:09
@stillalex stillalex marked this pull request as ready for review September 7, 2023 04:10
@stillalex
Copy link
Member Author

@dsmiley would like to merge this soon. do you think the context injection/extraction parts are correct now?
and apologies for the force merge, I wanted to rebase on top of other backports and ended up with this.

@stillalex stillalex merged commit a940231 into apache:branch_9x Sep 7, 2023
@stillalex
Copy link
Member Author

thank you @dsmiley I really appreciate your diligence here. very happy to see this land on 9.x too!

@stillalex stillalex deleted the SOLR-15367-9x-tracer branch September 7, 2023 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants