Skip to content

Commit 9dfbfb0

Browse files
committed
docs: add warning about sensitive data to SpanTracerFactory
1 parent ca9edb9 commit 9dfbfb0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/SpanTracerFactory.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,20 @@ public class SpanTracerFactory implements ApiTracerFactory {
5353
private final OpenTelemetry openTelemetry;
5454
private final ApiTracerContext apiTracerContext;
5555

56-
/** Creates a SpanTracerFactory */
56+
/**
57+
* <p>Warning: Traces may contain sensitive data such as resource names, full
58+
* URLs, and error messages.
59+
*
60+
* <p>Before configuring subscribers or exporters for traces, review the
61+
* contents of the spans and consult the [opentelemetry] documentation to
62+
* set up filters and formatters to prevent leaking sensitive information,
63+
* depending on your intended use case.
64+
*
65+
* <p>[OpenTelemetry Semantic Conventions]:
66+
* https://opentelemetry.io/docs/concepts/semantic-conventions/
67+
* <p>[opentelemetry]:
68+
* https://opentelemetry.io/docs/security/handling-sensitive-data/
69+
*/
5770
public SpanTracerFactory(OpenTelemetry openTelemetry) {
5871
this(openTelemetry, null, ApiTracerContext.empty());
5972
}

0 commit comments

Comments
 (0)