📄️ gRPC with Database
Demonstrates comprehensive distributed tracing in gRPC services with database operations using GoFrame and OpenTelemetry. This example showcases end-to-end trace instrumentation from gRPC calls through database queries, automatic gRPC method and database operation tracing, trace context propagation in RPC communication, span relationships between service calls and database operations, service discovery integration with tracing, and performance monitoring for distributed systems. Features include full-stack gRPC trace visibility, automatic database query instrumentation, service mesh observability, distributed transaction tracking, cross-service trace correlation, and production-ready patterns. Ideal for monitoring microservices architecture performance, debugging distributed gRPC systems, optimizing database query performance, ensuring observability in service mesh environments, and building enterprise monitoring solutions.
📄️ HTTP Service
Demonstrates comprehensive distributed tracing implementation in HTTP services using GoFrame with OpenTelemetry integration. This example showcases HTTP request and response tracing with automatic instrumentation, trace context propagation across service boundaries, span creation and attribute management, trace data export to OpenTelemetry collectors, integration with GoFrame's HTTP server middleware, and visualization of distributed traces. Features include automatic HTTP trace instrumentation, context propagation headers, custom span attributes, parent-child span relationships, trace sampling configuration, and production-ready observability patterns. Ideal for implementing distributed tracing in microservices, monitoring HTTP service performance, debugging request flows, ensuring observability in cloud-native applications, and building production monitoring systems.
📄️ HTTP with Database
Demonstrates comprehensive distributed tracing in HTTP services with database operations using GoFrame and OpenTelemetry. This example showcases end-to-end trace instrumentation from HTTP requests through database queries, automatic database operation tracing including MySQL and Redis operations, trace context propagation through the entire request lifecycle, span relationships between HTTP handlers and database calls, performance monitoring for database queries, and integration with GoFrame's ORM and cache components. Features include full-stack trace visibility, automatic database query instrumentation, slow query detection, connection pool monitoring, cache operation tracing, and production-ready observability. Ideal for monitoring full-stack application performance, debugging database-related issues, optimizing query performance, ensuring end-to-end observability in data-driven applications, and building comprehensive monitoring solutions.
📄️ In-Process Service (HTTP Exporter)
Demonstrates distributed tracing implementation in single-process applications using GoFrame with HTTP-based OpenTelemetry exporter for simplified observability. This example showcases in-process function call tracing with HTTP OTLP exporter configuration, span creation and management for internal operations, trace context propagation within a single process, HTTP-based trace data export to OpenTelemetry collectors, parent-child span relationships for nested function calls, and simplified deployment without gRPC dependencies. Features include lightweight HTTP exporter setup, automatic span instrumentation, in-memory trace context, firewall-friendly HTTP export, development-friendly configuration, and production-ready patterns. Ideal for monolithic application observability, development and testing environments, simplified trace data export, applications with HTTP-only infrastructure, and learning distributed tracing concepts.
📄️ In-Process Service (gRPC Exporter)
Demonstrates distributed tracing implementation in single-process applications using GoFrame with high-performance gRPC-based OpenTelemetry exporter. This example showcases in-process function call tracing with gRPC OTLP exporter configuration, span creation and management for internal operations, trace context propagation within a single process, efficient gRPC-based trace data export to OpenTelemetry collectors, parent-child span relationships for nested function calls, and high-throughput trace data transmission. Features include high-performance gRPC exporter setup, automatic span instrumentation, streaming trace export, efficient binary serialization, production-grade performance, and enterprise-ready patterns. Ideal for high-volume trace data generation, performance-critical applications, production monitoring systems, applications requiring efficient trace export, and building scalable observability solutions.
📄️ OpenTelemetry Example
Demonstrates comprehensive OpenTelemetry trace data export methods in GoFrame using OTLP protocol with both gRPC and HTTP exporters. This example showcases OTLP (OpenTelemetry Protocol) configuration for trace export, gRPC and HTTP exporter setup and comparison, trace data serialization and transmission, connection management and retry logic, batch processing and performance optimization, and integration with OpenTelemetry collectors. Features include flexible exporter configuration, efficient trace data transmission, automatic batching and compression, error handling and retry mechanisms, production-ready export patterns, and protocol selection guidance. Ideal for implementing production trace export, choosing appropriate export protocols, optimizing trace data transmission, ensuring reliable trace delivery, and building enterprise observability infrastructure with OpenTelemetry standard compliance.
📄️ Multi-Process Example
Demonstrates comprehensive distributed tracing across multiple processes using GoFrame's process management approaches including gcmd and gproc. This example showcases inter-process trace context propagation, process spawning and lifecycle management with tracing, distributed span relationships across process boundaries, trace correlation in multi-process architectures, different process communication patterns with tracing support, and integration with GoFrame's command and process components. Features include multi-process trace visibility, automatic context propagation between processes, parent-child process span relationships, process isolation with trace continuity, production-ready multi-process patterns, and enterprise architecture support. Ideal for building multi-process applications with observability, implementing distributed task processing, monitoring daemon and worker processes, ensuring trace continuity in complex process topologies, and creating scalable multi-process systems with comprehensive tracing.
📄️ OpenTelemetry Provider Examples
Demonstrates comprehensive OpenTelemetry trace provider configurations in GoFrame including gRPC and HTTP exporters with different setup patterns. This example showcases trace provider initialization and configuration, resource attribute management for service identification, sampling strategy configuration and selection, gRPC-based and HTTP-based exporter setup and comparison, span processor configuration for batch and simple processing, and provider lifecycle management. Features include flexible provider configuration patterns, resource semantic conventions, multiple sampling strategies (always, never, parent-based, ratio-based), exporter protocol selection guidance, production-ready provider setup, and enterprise deployment patterns. Ideal for understanding OpenTelemetry provider architecture, configuring production trace pipelines, selecting appropriate exporters and samplers, optimizing trace collection performance, and building scalable observability infrastructure with proper provider configuration.