Skip to content

Commit ec2eafd

Browse files
authored
Merge 2e7495a into 34a8bfd
2 parents 34a8bfd + 2e7495a commit ec2eafd

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

sentry-opentelemetry/sentry-opentelemetry-agent/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,17 @@ To enable debug logging for Sentry, please provide `SENTRY_DEBUG=true` as enviro
4444
add `debug=true` to your `sentry.properties`.
4545

4646
To also show debug output for OpenTelemetry please add `-Dotel.javaagent.debug=true` to the command.
47+
48+
## Getting rid of exporter error messages
49+
50+
In case you are using this agent without needing to use any OpenTelemetry exporters you can add
51+
the following environment variables to turn off exporters and stop seeing error messages about
52+
servers not being reachable in the logs.
53+
54+
Example log message:
55+
```
56+
ERROR io.opentelemetry.exporter.internal.grpc.OkHttpGrpcExporter - Failed to export metrics. The request could not be executed. Full error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317
57+
```
58+
59+
To turn off exporting of traces you can set `OTEL_TRACES_EXPORTER=none`
60+
see [OpenTelemetry GitHub](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure#otlp-exporter-span-metric-and-log-exporters)

sentry-opentelemetry/sentry-opentelemetry-agentcustomization/src/main/java/io/sentry/opentelemetry/SentryAutoConfigurationCustomizerProvider.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ private SdkTracerProviderBuilder configureSdkTracerProvider(
9292

9393
private Map<String, String> getDefaultProperties() {
9494
Map<String, String> properties = new HashMap<>();
95-
properties.put("otel.traces.exporter", "none");
96-
properties.put("otel.metrics.exporter", "none");
9795
properties.put("otel.propagators", "sentry");
9896
return properties;
9997
}

0 commit comments

Comments
 (0)