Skip to content

Commit

Permalink
Qualifies that KeyFactory and Propagation.Factory.create will go in B…
Browse files Browse the repository at this point in the history
…rave 7 (#1400)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
  • Loading branch information
codefromthecrypt authored Jan 8, 2024
1 parent 73687f1 commit ad39719
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit ad39719

Please sign in to comment.