Skip to content

Commit d213245

Browse files
authored
fix: Add the deprecation notice for tracing enable/disable option. (#1866)
1 parent 26c4cbd commit d213245

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreOpenTelemetryOptions.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ public class FirestoreOpenTelemetryOptions {
3535
this.openTelemetry = builder.openTelemetry;
3636
}
3737

38+
/**
39+
* @deprecated This method will be removed in the next minor version update. Please use a no-op
40+
* TracerProvider or set the environment variable `FIRESTORE_ENABLE_TRACING=OFF` to disable
41+
* tracing. If the GlobalOpenTelemetry or the OpenTelemetry instance passed to Firestore
42+
* contain a valid TracerProvider, the Firestore client will generate spans by utilizing it.
43+
*/
44+
@Deprecated
3845
public boolean isTracingEnabled() {
3946
return tracingEnabled;
4047
}
@@ -78,7 +85,13 @@ public FirestoreOpenTelemetryOptions build() {
7885
* Sets whether tracing should be enabled.
7986
*
8087
* @param tracingEnabled Whether tracing should be enabled.
88+
* @deprecated This method will be removed in the next minor version update. Please use a no-op
89+
* TracerProvider or set the environment variable `FIRESTORE_ENABLE_TRACING=OFF` to disable
90+
* tracing. If the GlobalOpenTelemetry or the OpenTelemetry instance passed to Firestore
91+
* contains a valid TracerProvider, the Firestore client will generate spans by utilizing
92+
* it.
8193
*/
94+
@Deprecated
8295
@Nonnull
8396
public FirestoreOpenTelemetryOptions.Builder setTracingEnabled(boolean tracingEnabled) {
8497
this.tracingEnabled = tracingEnabled;

0 commit comments

Comments
 (0)