Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit a012a62

Browse files
authored
Context: Remove CONTEXT_SPAN_KEY and TAG_CONTEXT_KEY from API. (#1938)
* Context: Remove CONTEXT_SPAN_KEY and TAG_CONTEXT_KEY from API. * Upgrade gRPC version.
1 parent 9fd00d3 commit a012a62

File tree

6 files changed

+8
-20
lines changed

6 files changed

+8
-20
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## Unreleased
2+
- Remove `CONTEXT_SPAN_KEY` and `TAG_CONTEXT_KEY` from API. This will be a breaking change to those who
3+
depend on these two keys, but anyone except gRPC shouldn't use it directly anyway.
24

35
## 0.23.0 - 2019-06-12
46
- Make `StackdriverStatsExporter.unregister()` a public API.

api/src/main/java/io/opencensus/tags/unsafe/ContextUtils.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,8 @@ private ContextUtils() {}
4444
/**
4545
* The {@link io.grpc.Context.Key} used to interact with the {@code TagContext} contained in the
4646
* {@link io.grpc.Context}.
47-
*
48-
* @since 0.8
49-
* @deprecated from API since 0.21. Use {@link #withValue(Context, TagContext)} and {@link
50-
* #getValue(Context)} instead.
5147
*/
52-
// TODO(songy23): make this private once gRPC migrates to use the alternative APIs.
53-
@Deprecated
54-
public static final Context.Key</*@Nullable*/ TagContext> TAG_CONTEXT_KEY =
48+
private static final Context.Key</*@Nullable*/ TagContext> TAG_CONTEXT_KEY =
5549
Context.keyWithDefault("opencensus-tag-context-key", EMPTY_TAG_CONTEXT);
5650

5751
/**

api/src/main/java/io/opencensus/trace/unsafe/ContextUtils.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,8 @@ public final class ContextUtils {
3737
// No instance of this class.
3838
private ContextUtils() {}
3939

40-
/**
41-
* The {@link io.grpc.Context.Key} used to interact with {@link io.grpc.Context}.
42-
*
43-
* @since 0.5
44-
* @deprecated from API since 0.21. Use {@link #withValue(Context, Span)} and {@link
45-
* #getValue(Context)} instead.
46-
*/
47-
// TODO(songy23): make this private once gRPC migrates to use the alternative APIs.
48-
@Deprecated
49-
public static final Context.Key</*@Nullable*/ Span> CONTEXT_SPAN_KEY =
40+
/** The {@link io.grpc.Context.Key} used to interact with {@link io.grpc.Context}. */
41+
private static final Context.Key</*@Nullable*/ Span> CONTEXT_SPAN_KEY =
5042
Context.<Span>key("opencensus-trace-span-key");
5143

5244
/**

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ subprojects {
161161
findBugsAnnotationsVersion = '3.0.1'
162162
findBugsJsr305Version = '3.0.2'
163163
errorProneVersion = '2.3.2'
164-
grpcVersion = '1.19.0'
164+
grpcVersion = '1.21.0'
165165
guavaVersion = '26.0-android'
166166
googleAuthVersion = '0.13.0'
167167
googleCloudBetaVersion = '0.83.0-beta'

examples/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ group = "io.opencensus"
3434
version = "0.24.0-SNAPSHOT" // CURRENT_OPENCENSUS_VERSION
3535

3636
def opencensusVersion = "0.23.0" // LATEST_OPENCENSUS_RELEASE_VERSION
37-
def grpcVersion = "1.19.0" // CURRENT_GRPC_VERSION
37+
def grpcVersion = "1.21.0" // CURRENT_GRPC_VERSION
3838
def prometheusVersion = "0.6.0"
3939
def jettyVersion = "9.4.17.v20190418"
4040
def tcnativeVersion = "2.0.20.Final"

examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<!-- change to the version you want to use. -->
1414
<jetty.version>9.4.17.v20190418</jetty.version>
1515
<opencensus.version>0.23.0</opencensus.version><!-- LATEST_OPENCENSUS_RELEASE_VERSION -->
16-
<grpc.version>1.19.0</grpc.version><!-- CURRENT_GRPC_VERSION -->
16+
<grpc.version>1.21.0</grpc.version><!-- CURRENT_GRPC_VERSION -->
1717
</properties>
1818
<dependencies>
1919
<dependency>

0 commit comments

Comments
 (0)