How to Integrate Jaeger Tracing with Rainbond Using OpenTelemetry
This guide explains why distributed tracing is essential for micro‑service architectures, introduces Jaeger as an open‑source APM solution, and provides step‑by‑step instructions for deploying and configuring Jaeger on Rainbond with OpenTelemetry, including environment variables, service naming, and topology generation.
In micro‑service architectures a single client request may involve dozens of services, making monitoring and troubleshooting increasingly complex. An Application Performance Monitoring (APM) tool such as Jaeger helps understand system behavior, analyze performance issues, and quickly locate failures.
What is Jaeger?
Jaeger is an open‑source distributed tracing system released by Uber, used for monitoring and fault‑diagnosis of micro‑service based systems. Its key capabilities include:
Distributed context propagation and transaction monitoring
Root‑cause analysis and service‑dependency graphs
Performance and latency optimization
OpenTracing‑inspired data model
Multiple storage back‑ends (Cassandra, Elasticsearch, memory)
System topology visualization
Service performance monitoring (SPM)
Adaptive sampling
Jaeger Architecture
The system consists of the following components:
Jaeger Client : SDK used by applications to create spans.
Jaeger Agent : Collects data from the client.
Jaeger Collector : Receives data from agents (pull or push mode).
DB Storage : Backend storage for collected data, typically Elasticsearch or Cassandra.
Spark jobs : Generate topology‑graph data for the UI.
Jaeger Query Service & UI : Queries storage and provides API and UI.
Integrating Jaeger on Rainbond
1. Add OpenTelemetry Client
Before version v1.36, Jaeger Client was built on the
OpenTracing APIand required both the client library and a Jaeger Agent to send spans to the collector. From v1.36 onward, the OpenTelemetry Java agent replaces the OpenTracing‑based client.
To use OpenTelemetry, add the Java agent at startup, for example:
<code>java -javaagent:path/to/opentelemetry-javaagent.jar -jar myapp.jar</code>On Rainbond, the agent JAR can be downloaded via a plugin and the startup command modified accordingly.
2. Connect to Jaeger Collector
All micro‑service components that have the OpenTelemetry Java agent installed should be linked to the Jaeger Collector.
3. Practical Steps (Spring Cloud Pig example)
Source code: Spring Cloud Pig . Follow the Rainbond quick‑install guide for deployment.
3.1 Deploy Spring Cloud Pig
Refer to the Spring Cloud Pig deployment tutorial and video for details.
3.2 Install OpenTelemetry Plugin
Install the
opentelemetry-java-agentplugin from the Rainbond app store, which downloads
opentelemetry-javaagent.jarinto each micro‑service component.
3.3 Deploy Jaeger
Search for “Jaeger” in the open‑source app store and install it into the target application.
3.4 Configure OpenTelemetry Agent Plugin
Enable the
opentelemetry-java-agentplugin for each component (e.g.,
pig-gateway) and restart the component.
3.5 Set Environment Variables
OTEL_TRACES_EXPORTER=jaeger(select Jaeger exporter)
OTEL_EXPORTER_JAEGER_ENDPOINT=http://127.0.0.1:14250(Jaeger Collector gRPC endpoint)
OTEL_EXPORTER_JAEGER_TIMEOUT=10000(timeout in ms)
OTEL_METRICS_EXPORTER=none(disable metrics exporter)
JAVA_OPTS=-javaagent:/agent/opentelemetry-javaagent.jar(Java start‑up parameter)
These variables can be applied via a unified application configuration group.
3.6 Configure Service Names
Set
OTEL_SERVICE_NAMEfor each component, e.g.,
OTEL_SERVICE_NAME=pig-gatewayor
OTEL_SERVICE_NAME=pig-auth.
3.7 Establish Dependencies
Add a dependency from every micro‑service component to the Jaeger Collector so that the topology graph can display the collector and other services.
3.8 Quick Jaeger Usage
Log into the Spring Cloud Pig UI to generate trace data.
Expose the Jaeger Query service (port 16686) and open the Jaeger UI.
Search for traces of a specific service (e.g.,
pig-gateway) using filters such as operation, tags, time range, and duration.
Inspect the trace to see the call chain and identify slow or problematic services.
3.9 Generate Topology Graph
The topology is generated by the
spark-dependenciescomponent, which runs a Spark job to collect spans from storage, analyze service links, and store the results for UI display. Start this component only when topology data is needed, as it consumes significant resources.
Conclusion
With an APM system like Jaeger in place, you can better analyze business performance and troubleshoot failures. Combining Rainbond as the platform allows seamless deployment of Spring Cloud, Jaeger, or other APM tools, freeing you from complex setup and letting you focus on business logic.
Reference Links
OpenTracing: http://opentracing.io/
OpenTelemetry: https://opentelemetry.io/
Jaeger and OpenTelemetry: https://medium.com/jaegertracing/jaeger-and-opentelemetry-1846f701d9f2
Rainbond quick‑install: https://www.rainbond.com/docs/quick-start/quick-install
Spring Cloud Pig deployment tutorial: https://t.goodrain.com/d/3-springcloud-pig-rainbond
Spring Cloud Pig video tutorial: https://www.bilibili.com/video/BV1MZ4y1b7wW
Jaeger Spark dependencies: https://github.com/jaegertracing/spark-dependencies
About Rainbond
Rainbond is 100% open source, easy to use, requires no deep knowledge of containers or Kubernetes, supports managing multiple Kubernetes clusters, and provides enterprise‑grade full lifecycle management for applications.
GitHub: https://github.com/goodrain/rainbond
Website: https://www.rainbond.com
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.