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

Qualifies that KeyFactory and Propagation.Factory.create will go in Brave 7 #1400

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions brave/src/main/java/brave/propagation/Propagation.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,15 @@ public boolean requires128BitTraceId() {

/**
* @deprecated end users and instrumentation should never call this, and instead use
* {@link #get()}. This will not be removed, to avoid rev-lock upgrading to Brave 6.
* {@link #get()}. This will be removed in Brave 7, to allow users to transition without revlock
* upgrading to Brave 6.
*/
@Deprecated public <K> Propagation<K> create(KeyFactory<K> unused) {
// In Brave 5.12, this was abstract, but not used: `get()` dispatched
// to this. Brave 5.18 implemented this with the below exception to force
// `get()` to be overridden. Doing so allows us to make `get()` abstract
// in Brave 6.0, but we will have to leave this here regardless, to
// prevent revlock upgrading.
// in Brave 6.0. Then, this can be safely removed in Brave 7.0 without a
// revlock.
throw new UnsupportedOperationException("This was replaced with PropagationFactory.get() in Brave 5.12");
}

Expand Down Expand Up @@ -124,8 +125,8 @@ public TraceContext decorate(TraceContext context) {

/**
* @since 4.0
* @deprecated since 5.12 non-string keys are no longer supported. This will not be removed, to
* avoid rev-lock upgrading to Brave 6.
* @deprecated since 5.12 non-string keys are no longer supported. This will be removed in Brave
* 7, to allow users to transition without revlock upgrading to Brave 6.
*/
@Deprecated
interface KeyFactory<K> {
Expand Down