Top Related Projects
OpenTracing API for Go. 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
OpenTelemetry Go API and SDK
APM, Application Performance Monitoring System
Zipkin is a distributed tracing system
Quick Overview
Jaeger is an open-source, end-to-end distributed tracing system developed by Uber Technologies. It helps monitor and troubleshoot microservices-based distributed systems by tracking requests as they flow through various services, providing insights into system behavior and performance.
Pros
- Highly scalable and designed for cloud-native environments
- Supports multiple storage backends (Cassandra, Elasticsearch, and more)
- OpenTracing compatible, allowing for easy integration with various frameworks and libraries
- Provides a rich UI for visualizing and analyzing traces
Cons
- Steep learning curve for newcomers to distributed tracing
- Can introduce overhead in high-traffic systems if not properly configured
- Limited built-in alerting capabilities compared to some other monitoring solutions
- Requires additional infrastructure setup and maintenance
Code Examples
- Initializing a Jaeger tracer:
import (
"github.com/opentracing/opentracing-go"
"github.com/uber/jaeger-client-go"
"github.com/uber/jaeger-client-go/config"
)
func initJaeger(service string) (opentracing.Tracer, io.Closer) {
cfg := &config.Configuration{
ServiceName: service,
Sampler: &config.SamplerConfig{
Type: "const",
Param: 1,
},
Reporter: &config.ReporterConfig{
LogSpans: true,
},
}
tracer, closer, err := cfg.NewTracer(config.Logger(jaeger.StdLogger))
if err != nil {
panic(fmt.Sprintf("ERROR: cannot init Jaeger: %v\n", err))
}
return tracer, closer
}
- Creating a span:
span := opentracing.StartSpan("operation_name")
defer span.Finish()
- Adding tags to a span:
span.SetTag("http.method", "GET")
span.SetTag("http.url", "http://example.com")
- Creating a child span:
childSpan := opentracing.StartSpan(
"child_operation",
opentracing.ChildOf(parentSpan.Context()),
)
defer childSpan.Finish()
Getting Started
To start using Jaeger in your Go application:
-
Install the Jaeger client:
go get github.com/uber/jaeger-client-go
-
Initialize the tracer in your main function:
tracer, closer := initJaeger("your-service-name") defer closer.Close() opentracing.SetGlobalTracer(tracer)
-
Instrument your code using the OpenTracing API:
span := opentracing.StartSpan("operation_name") defer span.Finish() // Your code here
-
Run a Jaeger backend (All-in-one for development):
docker run -d --name jaeger \ -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \ -p 5775:5775/udp \ -p 6831:6831/udp \ -p 6832:6832/udp \ -p 5778:5778 \ -p 16686:16686 \ -p 14250:14250 \ -p 14268:14268 \ -p 14269:14269 \ -p 9411:9411 \ jaegertracing/all-in-one:1.35
-
Access the Jaeger UI at
http://localhost:16686
to view your traces.
Competitor Comparisons
OpenTracing API for Go. 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
Pros of opentracing-go
- Lightweight and focused solely on tracing API
- Language-specific implementation of OpenTracing standard
- Easier to integrate into existing Go projects
Cons of opentracing-go
- Requires additional components for full distributed tracing functionality
- Less out-of-the-box features compared to Jaeger
- Maintenance has slowed down due to the transition to OpenTelemetry
Code Comparison
opentracing-go:
span := opentracing.StartSpan("operation_name")
defer span.Finish()
span.SetTag("key", "value")
span.LogFields(
log.String("event", "soft error"),
log.String("type", "cache timeout"),
log.Int("waited.millis", 1500),
)
Jaeger:
tracer := cfg.NewTracer()
opentracing.SetGlobalTracer(tracer)
span := tracer.StartSpan("operation_name")
defer span.Finish()
span.SetTag("key", "value")
span.LogKV("event", "soft error", "type", "cache timeout", "waited.millis", 1500)
While opentracing-go provides a standardized API for distributed tracing in Go, Jaeger offers a more comprehensive solution with built-in tracing, collection, and visualization capabilities. opentracing-go is ideal for projects requiring a lightweight tracing API, while Jaeger is better suited for full-featured distributed tracing implementations.
OpenTelemetry Go API and SDK
Pros of OpenTelemetry-Go
- Vendor-neutral and standardized approach to observability
- Supports multiple backends and integrations
- More comprehensive, covering metrics, logs, and traces
Cons of OpenTelemetry-Go
- Steeper learning curve due to broader scope
- Less mature compared to Jaeger's established ecosystem
- May require additional configuration for full functionality
Code Comparison
Jaeger:
tracer, closer := jaeger.NewTracer(
"service-name",
jaeger.NewConstSampler(true),
jaeger.NewInMemoryReporter(),
)
defer closer.Close()
OpenTelemetry-Go:
tp := sdktrace.NewTracerProvider(
sdktrace.WithSampler(sdktrace.AlwaysSample()),
sdktrace.WithBatcher(exporter),
)
defer tp.Shutdown(context.Background())
otel.SetTracerProvider(tp)
Both examples show basic tracer setup, but OpenTelemetry-Go offers more flexibility in configuration and backend choices. Jaeger's setup is simpler for quick start, while OpenTelemetry requires more initial configuration but provides greater extensibility.
OpenTelemetry-Go is part of a larger, standardized observability framework, making it a more future-proof choice for complex, multi-vendor environments. However, Jaeger remains a solid option for those seeking a dedicated, battle-tested tracing solution with a gentler learning curve.
Pros of APM Server
- Seamless integration with Elasticsearch and Kibana for powerful data analysis and visualization
- Built-in support for a wide range of programming languages and frameworks
- Offers real-time monitoring and alerting capabilities out of the box
Cons of APM Server
- Requires Elasticsearch as a backend, which may increase complexity and resource usage
- Less flexible in terms of storage options compared to Jaeger's multiple storage backends
- Steeper learning curve for users not familiar with the Elastic Stack ecosystem
Code Comparison
APM Server (Go):
func (p *processor) loadProcessors(config *Config) error {
for _, processorConfig := range config.Processors {
processor, err := processors.New(processorConfig)
if err != nil {
return err
}
p.processors = append(p.processors, processor)
}
return nil
}
Jaeger (Go):
func (b *Builder) CreateSpanReader() (spanstore.Reader, error) {
spanReader, err := b.storageFactory.CreateSpanReader()
if err != nil {
return nil, err
}
return spanReader, nil
}
Both projects use Go and implement similar functionality for processing and storing spans, but APM Server's code is more focused on configuring processors, while Jaeger's code emphasizes creating span readers for different storage backends.
APM, Application Performance Monitoring System
Pros of SkyWalking
- More comprehensive observability platform, including APM, metrics, and logging
- Supports a wider range of programming languages and frameworks
- Provides a built-in service mesh observability solution
Cons of SkyWalking
- Steeper learning curve due to more complex architecture
- Potentially higher resource consumption for full-stack deployment
- Less native cloud provider integrations compared to Jaeger
Code Comparison
SkyWalking agent configuration (Java):
-javaagent:/path/to/skywalking-agent.jar
-Dskywalking.agent.service_name=your-service-name
-Dskywalking.collector.backend_service=oap-server:11800
Jaeger client configuration (Java):
import io.jaegertracing.Configuration;
Configuration config = Configuration.fromEnv();
Tracer tracer = config.getTracer();
Both projects offer distributed tracing capabilities, but SkyWalking provides a more comprehensive observability solution with additional features like service mesh monitoring and metrics collection. Jaeger, on the other hand, focuses primarily on distributed tracing and offers simpler integration with cloud-native environments.
SkyWalking's agent-based approach allows for more detailed monitoring across various languages and frameworks, while Jaeger's client libraries provide a more lightweight solution for distributed tracing. The choice between the two depends on the specific requirements of your project and the desired level of observability.
Zipkin is a distributed tracing system
Pros of Zipkin
- Simpler architecture and easier to set up for small to medium-scale deployments
- Better support for legacy systems and a wider range of programming languages
- More mature project with a longer history and established community
Cons of Zipkin
- Less scalable for very large distributed systems compared to Jaeger
- Fewer built-in features for advanced analysis and visualization
- Limited support for OpenTelemetry, which is becoming an industry standard
Code Comparison
Zipkin instrumentation example (Java):
Span span = tracer.newTrace().name("encode").start();
try {
doSomethingExpensive();
} finally {
span.finish();
}
Jaeger instrumentation example (Java):
Span span = tracer.buildSpan("encode").start();
try {
doSomethingExpensive();
} finally {
span.finish();
}
Both Jaeger and Zipkin are popular distributed tracing systems used for monitoring and troubleshooting microservices architectures. While they share similar core functionality, they have distinct features and design philosophies that make them suitable for different use cases and environments.
Zipkin is often preferred for its simplicity and ease of integration with legacy systems, while Jaeger excels in large-scale deployments and offers more advanced features. The choice between the two depends on factors such as the scale of the system, existing infrastructure, and specific requirements for analysis and visualization.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Jaeger - a Distributed Tracing System
ð¥ð¥ð¥ Jaeger v2 is coming! Read the blog post and try it out.
graph TD
SDK["OpenTelemetry SDK"] --> |HTTP or gRPC| COLLECTOR
COLLECTOR["Jaeger Collector"] --> STORE[Storage]
COLLECTOR --> |gRPC| PLUGIN[Storage Plugin]
COLLECTOR --> |gRPC/sampling| SDK
PLUGIN --> STORE
QUERY[Jaeger Query Service] --> STORE
QUERY --> |gRPC| PLUGIN
UI[Jaeger UI] --> |HTTP| QUERY
subgraph Application Host
subgraph User Application
SDK
end
end
Jaeger, inspired by Dapper and OpenZipkin, is a distributed tracing platform created by Uber Technologies and donated to Cloud Native Computing Foundation. It can be used for monitoring microservices-based distributed systems:
- Distributed context propagation
- Distributed transaction monitoring
- Root cause analysis
- Service dependency analysis
- Performance / latency optimization
See also:
- Jaeger documentation for getting started, operational details, and other information.
- Blog post Evolving Distributed Tracing at Uber.
- Tutorial / walkthrough Take Jaeger for a HotROD ride.
Jaeger is hosted by the Cloud Native Computing Foundation (CNCF) as the 7th top-level project (graduated in October 2019). If you are a company that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details about who's involved and how Jaeger plays a role, read the CNCF Jaeger incubation announcement and Jaeger graduation announcement.
Get Involved
Jaeger is an open source project with open governance. We welcome contributions from the community, and we would love your help to improve and extend the project. Here are some ideas for how to get involved. Many of them do not even require any coding.
Features
High Scalability
Jaeger backend is designed to have no single points of failure and to scale with the business needs. For example, any given Jaeger installation at Uber is typically processing several billions of spans per day.
Relationship with OpenTelemetry
The Jaeger and OpenTelemetry projects have different goals. OpenTelemetry aims to provide APIs and SDKs in multiple languages to allow applications to export various telemetry data out of the process, to any number of metrics and tracing backends. The Jaeger project is primarily the tracing backend that receives tracing telemetry data and provides processing, aggregation, data mining, and visualizations of that data. For more information please refer to a blog post Jaeger and OpenTelemetry.
Jaeger was originally designed to support the OpenTracing standard. The terminology is still used in Jaeger UI, but the concepts have direct mapping to the OpenTelemetry data model of traces.
Capability | OpenTracing concept | OpenTelemetry concept |
---|---|---|
Represent traces as directed acyclic graphs (not just trees) | span references | span links |
Strongly typed span attributes | span tags | span attributes |
Strongly typed events/logs | span logs | span events |
Jaeger project recommends OpenTelemetry SDKs for instrumentation, instead of now-deprecated Jaeger SDKs.
Multiple storage backends
Jaeger can be used with a growing a number of storage backends:
- It natively supports two popular open source NoSQL databases as trace storage backends: Cassandra and Elasticsearch.
- It integrates via a gRPC API with other well known databases that have been certified to be Jaeger compliant: TimescaleDB via Promscale, ClickHouse.
- There is embedded database support using Badger and simple in-memory storage for testing setups.
- ScyllaDB can be used as a drop-in replacement for Cassandra since it uses the same data model and query language.
- There are ongoing community experiments using other databases, such as InfluxDB, Amazon DynamoDB, YugabyteDB(YCQL).
Modern Web UI
Jaeger Web UI is implemented in Javascript using popular open source frameworks like React. Several performance improvements have been released in v1.0 to allow the UI to efficiently deal with large volumes of data and to display traces with tens of thousands of spans (e.g. we tried a trace with 80,000 spans).
Cloud Native Deployment
Jaeger backend is distributed as a collection of Docker images. The binaries support various configuration methods, including command line options, environment variables, and configuration files in multiple formats (yaml, toml, etc.).
The recommended way to deploy Jaeger in a production Kubernetes cluster is via the Jaeger Operator.
The Jaeger Operator provides a CLI to generate Kubernetes manifests from the Jaeger CR. This can be considered as an alternative source over plain Kubernetes manifest files.
The Jaeger ecosystem also provides a Helm chart as an alternative way to deploy Jaeger.
Observability
All Jaeger backend components expose Prometheus metrics by default (other metrics backends are also supported). Logs are written to standard out using the structured logging library zap.
Security
Third-party security audits of Jaeger are available in https://github.com/jaegertracing/security-audits. Please see Issue #1718 for the summary of available security mechanisms in Jaeger.
Backwards compatibility with Zipkin
Although we recommend instrumenting applications with OpenTelemetry, if your organization has already invested in the instrumentation using Zipkin libraries, you do not have to rewrite all that code. Jaeger provides backwards compatibility with Zipkin by accepting spans in Zipkin formats (Thrift or JSON v1/v2) over HTTP. Switching from Zipkin backend is just a matter of routing the traffic from Zipkin libraries to the Jaeger backend.
Version Compatibility Guarantees
Occasionally, CLI flags can be deprecated due to, for example, usability improvements or new functionality. In such situations, developers introducing the deprecation are required to follow these guidelines.
In short, for a deprecated CLI flag, you should expect to see the following message in the --help
documentation:
(deprecated, will be removed after yyyy-mm-dd or in release vX.Y.Z, whichever is later)
A grace period of at least 3 months or two minor version bumps (whichever is later) from the first release containing the deprecation notice will be provided before the deprecated CLI flag can be deleted.
For example, consider a scenario where v1.28.0 is released on 01-Jun-2021 containing a deprecation notice for a CLI flag. This flag will remain in a deprecated state until the later of 01-Sep-2021 or v1.30.0 where it can be removed on or after either of those events. It may remain deprecated for longer than the aforementioned grace period.
Go Version Compatibility Guarantees
The Jaeger project attempts to track the currently supported versions of Go, as defined by the Go team. Removing support for an unsupported Go version is not considered a breaking change.
Starting with the release of Go 1.21, support for Go versions will be updated as follows:
- Soon after the release of a new Go minor version
N
, updates will be made to the build and tests steps to accommodate the latest Go minor version. - Soon after the release of a new Go minor version
N
, support for Go versionN-2
will be removed and versionN-1
will become the minimum required version.
Related Repositories
Documentation
- Published: https://www.jaegertracing.io/docs/
- Source: https://github.com/jaegertracing/documentation
Instrumentation Libraries
Jaeger project recommends OpenTelemetry SDKs for instrumentation, instead of Jaeger's native SDKs that are now deprecated.
Deployment
Components
Building From Source
See CONTRIBUTING.
Contributing
See CONTRIBUTING.
Thanks to all the people who already contributed!
Maintainers
Rules for becoming a maintainer are defined in the GOVERNANCE document.
Below are the official maintainers of the Jaeger project.
Please use @jaegertracing/jaeger-maintainers
to tag them on issues / PRs.
Some repositories under jaegertracing org have additional maintainers.
Emeritus Maintainers
We are grateful to our former maintainers for their contributions to the Jaeger project.
Project Status Meetings
The Jaeger maintainers and contributors meet regularly on a video call. Everyone is welcome to join, including end users. For meeting details, see https://www.jaegertracing.io/get-in-touch/.
Roadmap
See https://www.jaegertracing.io/docs/roadmap/
Get in Touch
Have questions, suggestions, bug reports? Reach the project community via these channels:
- Slack chat room
#jaeger
(need to join CNCF Slack for the first time) jaeger-tracing
mail group- GitHub issues and discussions
Adopters
Jaeger as a product consists of multiple components. We want to support different types of users, whether they are only using our instrumentation libraries or full end to end Jaeger installation, whether it runs in production or you use it to troubleshoot issues in development.
Please see ADOPTERS.md for some of the organizations using Jaeger today. If you would like to add your organization to the list, please comment on our survey issue.
License
Copyright (c) The Jaeger Authors. Apache 2.0 License.
Top Related Projects
OpenTracing API for Go. 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
OpenTelemetry Go API and SDK
APM, Application Performance Monitoring System
Zipkin is a distributed tracing system
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot