Skip to content

Commit 5ae1152

Browse files
Update README.md
Co-authored-by: Knut Olav Løite <[email protected]>
1 parent a85e494 commit 5ae1152

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ If you are using Maven, add this to your pom.xml file
216216
```
217217
If you are using Gradle, add this to your dependencies
218218
```Groovy
219-
compile 'io.opencensus:opencensus-impl:0.30.0'
220-
compile 'io.opencensus:opencensus-exporter-stats-stackdriver:0.30.0'
219+
compile 'io.opentelemetry:opentelemetry-sdk:{opentelemetry.version}'
220+
compile 'io.opentelemetry:opentelemetry-sdk-metrics:{opentelemetry.version}'
221+
compile 'io.opentelemetry:opentelemetry-exporter-oltp:{opentelemetry.version}'
221222
```
222223

223224
By default, the functionality is disabled. You need to enable OpenTelemetry metrics and must configure the OpenTelemetry with appropriate exporters at the startup of your application:

google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1388,12 +1388,12 @@ public static void enableOpenCensusTraces() {
13881388
}
13891389
}
13901390

1391-
@ObsoleteApi(
1392-
"The OpenCensus project is deprecated. Use enableOpenTelemetryTraces to switch to OpenTelemetry traces")
13931391
/**
13941392
* Always resets the activeTracingFramework. This variable is used for internal testing, and is
13951393
* not a valid production scenario
13961394
*/
1395+
@ObsoleteApi(
1396+
"The OpenCensus project is deprecated. Use enableOpenTelemetryTraces to switch to OpenTelemetry traces")
13971397
static void resetActiveTracingFramework() {
13981398
activeTracingFramework = null;
13991399
}

google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1868,7 +1868,7 @@ public void testOpenCensusMetricsDisable() {
18681868
.setInitialWaitForSessionTimeoutMillis(50L)
18691869
.build();
18701870
FakeClock clock = new FakeClock();
1871-
clock.currentTimeMillis = System.currentTimeMillis();
1871+
clock.currentTimeMillis.set(System.currentTimeMillis());
18721872
FakeMetricRegistry metricRegistry = new FakeMetricRegistry();
18731873
List<LabelValue> labelValues =
18741874
Arrays.asList(
@@ -1902,7 +1902,7 @@ public void testOpenTelemetrySessionMetrics() throws Exception {
19021902
.setInitialWaitForSessionTimeoutMillis(50L)
19031903
.build();
19041904
FakeClock clock = new FakeClock();
1905-
clock.currentTimeMillis = System.currentTimeMillis();
1905+
clock.currentTimeMillis.set(System.currentTimeMillis());
19061906

19071907
InMemoryMetricReader inMemoryMetricReader = InMemoryMetricReader.create();
19081908
SdkMeterProvider sdkMeterProvider =

0 commit comments

Comments
 (0)