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
34 changes: 32 additions & 2 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 @@ -85,7 +85,9 @@ general.micrometer.factory=org.apache.accumulo.test.metrics.TestStatsDRegistryFa

10. Log into Grafana (http://localhost:3003/) using the default credentials (root/root). Click the `Home` icon at the top, then click the `Accumulo Micrometer Test Dashboard`. If everything is working correctly, then you should see something like the image below.

![Grafana Screenshot](/images/blog/202206_metrics_and_tracing/Grafana_Screenshot.png)
<a class="p-3 border rounded d-block" href="{{ site.baseurl }}/images/blog/202206_metrics_and_tracing/Grafana_Screenshot.png">
<img src="{{ site.baseurl }}/images/blog/202206_metrics_and_tracing/Grafana_Screenshot.png" class="img-fluid rounded" alt="Grafana Screenshot"/>
</a>
Comment on lines -88 to +90
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I was making changes to this file I decided to add the styling we use in other pages for these screenshots. This helps the images remain in line with the other content.

For example:
image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't matter, really, but I think there's probably a way to specify the class on the image or at least on the section (div or p) containing the image, in the markdown form, that might be easier to read or maintain. Markdown, in general, is easier to work with than the raw HTML, but like I said, this doesn't really matter. The raw HTML is fine.


# Tracing

Expand Down Expand Up @@ -118,6 +120,8 @@ general.opentelemetry.enabled=true
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.

5. 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
Expand Down Expand Up @@ -148,4 +152,30 @@ docker run -d --rm --name jaeger \

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.

![Jaeger Screenshot](/images/blog/202206_metrics_and_tracing/Jaeger_Screenshot.png)
<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"/>
</a>

## Updated Configuration with Newer Versions of OpenTelemetry

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blog post was for the 2.1.0 release. It looks like the addition here updates / replaces items 5 and 6 above. I'm thinking that we should put a note in items 5 and 6 that says something like:

This contains instructions for configuring OpenTelemetry and Jaeger with Accumulo 2.1.0. As of Accumulo 2.1.4 the version of OpenTelemetry has been updated and the instructions have changed. See below for more information.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Added in 4b88f58.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot from 2025-04-08 14-52-32
Screenshot from 2025-04-08 14-52-18

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:

1. Configure the OpenTelemetry JavaAgent in accumulo-env.sh with OTLP export:
```bash
JAVA_OPTS=('-Dotel.traces.exporter=otlp' '-Dotel.exporter.otlp.endpoint=http://localhost:4317' '-Dotel.metrics.exporter=none' '-Dotel.logs.exporter=none' "${JAVA_OPTS[@]}")
JAVA_OPTS=('-javaagent:path/to/opentelemetry-javaagent.jar' "${JAVA_OPTS[@]}")
```
2. Start Jaeger with OTLP support:
```bash
docker run --rm --name jaeger \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-p 5778:5778 \
-p 9411:9411 \
jaegertracing/jaeger:2.3.0
```

After completing these updated steps, continue with steps 7-8 from the original instructions to view traces in Jaeger.