Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions _posts/blog/2022-06-22-2.1.0-metrics-and-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,9 @@ This example uses the OpenTelemetry Java Agent jar file to configure and export
general.opentelemetry.enabled=true
```

4. To enable tracing in the shell, set the `general.opentelemetry.enabled` property in the accumulo-client.properties configuration file.
```
# OpenTelemetry settings
general.opentelemetry.enabled=true
```

**Note:** If you are using Accumulo 2.1.4 or newer, skip steps 5-6 below and follow the updated instructions in the [Updated Configuration with Newer Versions of OpenTelemetry](#updated-configuration-with-newer-versions-of-opentelemetry) section.
**Note:** If you are using Accumulo 2.1.4 or newer, skip steps 4-5 below and follow the updated instructions in the [Updated Configuration with Newer Versions of OpenTelemetry](#updated-configuration-with-newer-versions-of-opentelemetry) section.

5. Configure the OpenTelemetry JavaAgent in accumulo-env.sh by uncommenting the following and updating the path to the java agent jar:
4. Configure the OpenTelemetry JavaAgent in accumulo-env.sh by uncommenting the following and updating the path to the java agent jar:
```
## Optionally setup OpenTelemetry SDK AutoConfigure
## See https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure
Expand All @@ -132,7 +126,7 @@ general.opentelemetry.enabled=true
#JAVA_OPTS=('-javaagent:path/to/opentelemetry-javaagent.jar' "${JAVA_OPTS[@]}")
```

6. Start Jaeger Docker container
5. Start Jaeger Docker container
```
docker run -d --rm --name jaeger \
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
Expand All @@ -145,12 +139,12 @@ docker run -d --rm --name jaeger \
-p 14250:14250 \
-p 9411:9411 jaegertracing/all-in-one:1.35
```
7. Start Accumulo. You should see the following statement in the server log files
6. Start Accumulo. You should see the following statement in the server log files
```
[trace.TraceUtil] INFO : Trace enabled in Accumulo: yes, OpenTelemetry instance: class io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_10.ApplicationOpenTelemetry110, Tracer instance: class io.opentelemetry.javaagent.instrumentation.opentelemetryapi.trace.ApplicationTracer
```

8. View traces in Jaeger UI at http://localhost:16686. You can select the service name on the left panel and click `Find Traces` to view the trace information. If everything is working correctly, then you should see something like the image below.
7. View traces in Jaeger UI at http://localhost:16686. You can select the service name on the left panel and click `Find Traces` to view the trace information. If everything is working correctly, then you should see something like the image below.

<a class="p-3 border rounded d-block" href="{{ site.baseurl }}/images/blog/202206_metrics_and_tracing/Jaeger_Screenshot.png">
<img src="{{ site.baseurl }}/images/blog/202206_metrics_and_tracing/Jaeger_Screenshot.png" class="img-fluid rounded" alt="Jaeger Screenshot"/>
Expand All @@ -160,7 +154,7 @@ docker run -d --rm --name jaeger \

The original tracing example above was written for Accumulo 2.1.0 which uses OpenTelemetry 1.19.0. Accumulo 2.1.4 has been updated to use OpenTelemetry 1.48.0, which requires different configuration. When working with Accumulo 2.1.4 or any deployment using OpenTelemetry 1.48.0 or newer, use OTLP (OpenTelemetry Protocol) instead of the direct Jaeger exporter.

Follow steps 1–4 from the [Tracing Example](#tracing-example) section, then use these updated steps in place of steps 5-6:
Follow steps 1–3 from the [Tracing Example](#tracing-example) section, then use these updated steps in place of steps 4-5:

1. Configure the OpenTelemetry JavaAgent in accumulo-env.sh with OTLP export:
```bash
Expand Down