@@ -419,12 +419,17 @@ OTEL_SERVICE_NAME=dice-server \
419
419
OTEL_TRACES_EXPORTER=logging \
420
420
OTEL_METRICS_EXPORTER=logging \
421
421
OTEL_LOGS_EXPORTER=logging \
422
+ OTEL_METRIC_EXPORT_INTERVAL=15000 \
422
423
java -jar ./build/libs/java-simple.jar
423
424
```
424
425
425
426
This basic setup has no effect on your app yet. You need to add code for
426
427
[ traces] ( #traces ) , [ metrics] ( #metrics ) , and/or [ logs] ( #logs ) .
427
428
429
+ Note that ` OTEL_METRIC_EXPORT_INTERVAL=15000 ` (milliseconds) is a temporary
430
+ setting to test that your metrics are properly generated. Remember to remove the
431
+ setting once you are done testing. The default is 60000 milliseconds.
432
+
428
433
#### Manual Configuration
429
434
430
435
` OpenTelemetrySdk.builder() ` returns an instance of ` OpenTelemetrySdkBuilder ` ,
@@ -1547,6 +1552,11 @@ example `OTEL_TRACES_EXPORTER=jaeger` configures your application to use the
1547
1552
Jaeger exporter. The corresponding Jaeger exporter library has to be provided in
1548
1553
the classpath of the application as well.
1549
1554
1555
+ If you use the ` console ` or ` logging ` exporter for metrics, consider temporarily
1556
+ setting ` OTEL_METRIC_EXPORT_INTERVAL ` to a small value like ` 15000 `
1557
+ (milliseconds) while testing that your metrics are properly recorded. Remember
1558
+ to remove the setting once you are done testing.
1559
+
1550
1560
It's also possible to set up the propagators via the ` OTEL_PROPAGATORS `
1551
1561
environment variable, like for example using the ` tracecontext ` value to use
1552
1562
[ W3C Trace Context] ( https://www.w3.org/TR/trace-context/ ) .
0 commit comments