Uptrace APM and Observability Platform
website·Indexed 42 days ago
https://apm-docs.inner.youdao.com/An open-source APM and observability platform based on OpenTelemetry standards, providing distributed tracing, metrics monitoring, and log collection. The documentation covers integration guides for Java, Python, Go, Rust, C++, .NET, PHP, and JavaScript/Node.js, as well as the OpenTelemetry Operator for Kubernetes, eBPF zero-code instrumentation (OBI), and AI Agent observability.
What's inside Uptrace
- OpenTelemetry provides a unified observability platform for collecting traces, metrics, and logs using a standard protocol. It supports a wide range of programming languages including Go, Python, Java, JavaScript, .NET, PHP, Rust, and C++. Key benefits include zero-code instrumentation for fast onboarding, full distributed tracing to locate performance bottlenecks, and a vendor-neutral standard (OTLP) that prevents lock-in and allows switching between different APM backends.
Overview of loongsuite-go-agent
loongsuite-go-agent is an OpenTelemetry compile-time automatic instrumentation tool developed by Alibaba. It allows developers to inject telemetry code during the build process without modifying the original source code. Key benefits include zero-code integration, high performance (zero runtime overhead for injection), and support for over 50 popular Go frameworks and libraries.Overview of OpenTelemetry Target Allocator
The Target Allocator (TA) is an optional component of the OpenTelemetry Operator designed to distribute Prometheus targets evenly across multiple Collector instances. It decouples service discovery from metric collection, allowing both to scale independently.
Key benefits include:
- Load Balancing: Ensures each Collector instance handles a similar number of targets.
- Prevention of Duplicate Scraping: Guarantees each target is scraped by only one Collector.
- Simplified Configuration: Centralizes Prometheus configuration and automatically discovers Kubernetes Prometheus Custom Resources (ServiceMonitor, PodMonitor, and PrometheusRule).
- Dynamic Scaling: Automatically redistributes targets when Collector instances are added or removed.
Overview of Uptrace Alerting and Notification System
Uptrace provides a system to detect and respond to system anomalies through Monitors and Notification Channels. The system supports real-time monitoring of key metrics, threshold-based intelligent alerting, and multi-channel notifications (Email, Slack, Telegram, PagerDuty, Webhook). It includes features for alert suppression to prevent alert storms and historical tracking for post-mortem analysis.Overview of OpenTelemetry eBPF Instrumentation (OBI)
OpenTelemetry eBPF Instrumentation (OBI) is a zero-intrusion monitoring tool based on eBPF (extended Berkeley Packet Filter) technology. It allows developers to capture distributed tracing data and performance metrics without modifying application code, restarting services, or installing language-specific SDKs. It works by injecting eBPF probes into the Linux kernel to intercept network system calls (e.g., read, write, sendto, recvfrom), parsing application-layer protocols (HTTP, gRPC), and exporting the resulting Spans and Metrics via the OTLP protocol to a backend like Uptrace or a Collector.Overview of OpenTelemetry Operator for Kubernetes
The OpenTelemetry Operator is a Kubernetes-based implementation used to manage the lifecycle of the OpenTelemetry Collector and automate the injection of OpenTelemetry instrumentation libraries into workloads. It provides a declarative configuration approach via Custom Resources (CRs), enabling automated creation, updates, and deletion of components without requiring manual application code changes for instrumentation.Overview of Uptrace Chart Annotations
Chart Annotations are labels or notes added to charts to provide context, such as marking deployments, releases, or failures. They appear as square dots on the X-axis (time axis). Clicking an annotation reveals its description and labels. The description field supports Markdown, allowing for links to external systems.Overview of OpenTelemetry Operator Auto-instrumentation
Auto-instrumentation allows developers to add distributed tracing, metrics, and logs to Kubernetes workloads without modifying application code. The OpenTelemetry Operator uses a Kubernetes Mutating Webhook to automatically inject instrumentation sidecars or init containers and necessary environment variables into Pods during creation based on specific annotations.Create and manage Spans for manual tracing in Go
Use atracerto create spans for tracking operations. Spans can be enriched with attributes, events, and status codes to provide context about the operation's execution and outcome.var tracer = otel.Tracer("my-service") func ProcessOrder(ctx context.Context, orderID string) error { // Start a span with attributes ctx, span := tracer.Start(ctx, "process_order", trace.WithAttributes( attribute.String("order.id", orderID), attribute.String("operation", "process"), ), trace.WithSpanKind(trace.SpanKindInternal), ) defer span.End() span.AddEvent("order_validation_started") if err := validateOrder(ctx, orderID); err != nil { span.RecordError(err) span.SetStatus(codes.Error, err.Error()) return err } span.SetStatus(codes.Ok, "order processed successfully") span.SetAttributes(attribute.Bool("order.success", true)) return nil }Verify system requirements for OBI
OBI requires a Linux environment with eBPF support. The minimum requirements are Linux Kernel 5.8+ (or RHEL 4.18+), x86_64 or arm64 architecture, and root/privileged permissions. It requires at least 100MB RAM and 0.1 CPU core.# Check kernel version uname -r # Check eBPF support ls /sys/kernel/debug/tracing/ # Check BTF support ls /sys/kernel/btf/vmlinuxOpenTelemetry Java Version and System Requirements
To use OpenTelemetry in Java applications, ensure the following version and architecture requirements are met:
- Java Version: Java 8+ (Java 17+ recommended)
- OpenTelemetry Java: v1.30.0+
- Java Agent: v2.0.0+
- Supported Architectures: x86_64, ARM64
- Signal Support: Traces and Metrics are fully supported; Logs are fully supported for Java 9+.
OpenTelemetry Overview
OpenTelemetry (OTel) is a CNCF project providing a vendor-neutral standard for collecting observability data (traces, metrics, and logs) from distributed systems. It consists of a set of APIs, SDKs, tools, and integrations that allow developers to instrument applications without being locked into a specific backend provider (e.g., Jaeger, Prometheus, or Datadog).