Skip to content

Commit d5d79f0

Browse files
brave: updates to non-deprecated functions (#39)
Signed-off-by: Adrian Cole <[email protected]>
1 parent c87d847 commit d5d79f0

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ In-between, re-apply the licenses.
5757
```bash
5858
$ ./mvnw versions:set -DnewVersion=1.3.3-SNAPSHOT -DgenerateBackupPoms=false
5959
$ ./mvnw com.mycila:license-maven-plugin:format
60-
$ ./mvnw versions:set -DnewVersion=1.3.2-SNAPSHOT -DgenerateBackupPoms=false
60+
$ ./mvnw versions:set -DnewVersion=0.3.7-SNAPSHOT -DgenerateBackupPoms=false
6161
$ git commit -am"Adjusts copyright headers for this year"
6262
```
6363

benchmarks/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2019-2020 The OpenZipkin Authors
4+
Copyright 2019-2024 The OpenZipkin Authors
55
66
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
77
in compliance with the License. You may obtain a copy of the License at

brave/pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2019-2020 The OpenZipkin Authors
4+
Copyright 2019-2024 The OpenZipkin Authors
55
66
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
77
in compliance with the License. You may obtain a copy of the License at
@@ -45,6 +45,12 @@
4545
<optional>true</optional>
4646
</dependency>
4747

48+
<dependency>
49+
<groupId>io.zipkin.reporter2</groupId>
50+
<artifactId>zipkin-reporter-brave</artifactId>
51+
<version>${zipkin-reporter.version}</version>
52+
</dependency>
53+
4854
<dependency>
4955
<groupId>${brave.groupId}</groupId>
5056
<artifactId>brave-instrumentation-http</artifactId>
@@ -95,7 +101,6 @@
95101
<include>brave/internal/collect/Lists*.class</include>
96102
<include>brave/internal/collect/LongBitSet*.class</include>
97103
<include>brave/internal/collect/UnsafeArrayMap*.class</include>
98-
<include>brave/internal/propagation/StringPropagationAdapter*.class</include>
99104
</includes>
100105
</filter>
101106
</filters>

brave/src/main/java/brave/secondary_sampling/SecondarySampling.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2020 The OpenZipkin Authors
2+
* Copyright 2019-2024 The OpenZipkin Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -20,7 +20,6 @@
2020
import brave.http.HttpTracing;
2121
import brave.http.HttpTracingCustomizer;
2222
import brave.internal.Nullable;
23-
import brave.internal.propagation.StringPropagationAdapter;
2423
import brave.propagation.Propagation;
2524
import brave.propagation.TraceContext;
2625
import brave.propagation.TraceContext.Extractor;
@@ -187,12 +186,16 @@ public SecondarySampling build() {
187186
return SecondarySamplingDecisions.FACTORY.decorate(result);
188187
}
189188

190-
@Override public Propagation<String> get() {
191-
return this;
189+
/**
190+
* @deprecated end users and instrumentation should never call this, and instead use
191+
* {@link #get()}. This only remains to avoid rev-lock upgrading to Brave 6.
192+
*/
193+
@Deprecated public <K> Propagation<K> create(KeyFactory<K> unused) {
194+
throw new UnsupportedOperationException("As of Brave 5.12, call PropagationFactory.get()");
192195
}
193196

194-
@Override public <K> Propagation<K> create(KeyFactory<K> keyFactory) {
195-
return StringPropagationAdapter.create(this, keyFactory);
197+
@Override public Propagation<String> get() {
198+
return this;
196199
}
197200

198201
@Override public <R> Injector<R> injector(Setter<R, String> setter) {

brave/src/test/java/brave/secondary_sampling/integration/TracedNode.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2020 The OpenZipkin Authors
2+
* Copyright 2019-2024 The OpenZipkin Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at
@@ -159,7 +159,7 @@ void execute(FakeHttpRequest.Client clientRequest) {
159159
FakeHttpRequest.Server serverRequest = new FakeHttpRequest.Server(clientRequest);
160160
Span span = serverHandler.handleReceive(serverRequest);
161161
callDownstream(serverRequest.path(), span);
162-
serverHandler.handleSend(new FakeHttpResponse.Server(), null, span);
162+
serverHandler.handleSend(new FakeHttpResponse.Server(), span);
163163
}
164164

165165
void execute(FakeRpcRequest.Client clientRequest) {
@@ -187,7 +187,7 @@ void callDownstreamHttp(String path, TracedNode down) {
187187
FakeHttpRequest.Client clientRequest = new FakeHttpRequest.Client(path);
188188
Span span = clientHandler.handleSend(clientRequest);
189189
down.execute(clientRequest);
190-
clientHandler.handleReceive(new FakeHttpResponse.Client(), null, span);
190+
clientHandler.handleReceive(new FakeHttpResponse.Client(), span);
191191
}
192192

193193
void callDownstreamRpc(String method, TracedNode down) {

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2019-2020 The OpenZipkin Authors
4+
Copyright 2019-2024 The OpenZipkin Authors
55
66
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
77
in compliance with the License. You may obtain a copy of the License at
@@ -46,7 +46,8 @@
4646
<!-- <brave.groupId>com.github.openzipkin.brave</brave.groupId>-->
4747
<!-- <brave.version>master-SNAPSHOT</brave.version>-->
4848
<brave.groupId>io.zipkin.brave</brave.groupId>
49-
<brave.version>5.13.3</brave.version>
49+
<brave.version>5.17.1</brave.version>
50+
<zipkin-reporter.version>2.17.2</zipkin-reporter.version>
5051

5152
<junit.version>4.13.1</junit.version>
5253
<assertj.version>3.18.1</assertj.version>

0 commit comments

Comments
 (0)