Telegen

Getting Started

  • Getting Started
    • Quick Start Guide
      • Overview
      • Prerequisites
        • System Requirements
        • Kernel Requirements
      • Installation Methods
        • Kubernetes (Recommended)
        • Linux
        • Docker
      • Verify Installation
        • Check Agent Status
        • Check Health Endpoint
        • Check Metrics
      • Targeted Instrumentation (Optional)
      • What Gets Collected
        • Auto-Discovered Metadata
      • Next Steps
    • Core Concepts
      • Deployment Modes
        • Agent Mode
        • Collector Mode
      • Signal Types
        • Signal Correlation
      • Auto-Discovery
        • Cloud Detection
        • Runtime Detection
        • Database Detection
      • eBPF Programs
        • eBPF Program Types Used
      • Resource Attributes
      • Next Steps
    • Architecture Overview
      • High-Level Architecture
        • Component Overview
      • Data Flow
      • eBPF Tracer Architecture
        • Tracer Types
        • eBPF Maps
      • Pipeline Architecture
        • Signal Processing Pipeline
        • Export Pipeline
      • Memory Architecture
        • Buffer Management
        • Memory Limits
      • Security Model
        • Required Capabilities
        • Privilege Separation
      • High Availability
        • DaemonSet Mode
        • Collector Mode (HA)
      • Performance Characteristics
        • Overhead
        • Throughput
      • Next Steps

Installation

  • Installation
    • Deployment Methods
    • Quick Reference
      • Minimum Requirements
      • Choosing a Deployment Mode
        • Pipeline Deployment Guide
        • Kubernetes Installation
        • Helm Installation
        • Docker Installation
        • Linux Installation
        • OpenShift Installation
        • AWS ECS Installation

Configuration

  • Configuration
    • Configuration Philosophy
    • Common Exporter Pipeline
    • Configuration Methods
    • Sections
      • Minimal Configuration
        • Zero-Config Approach
        • Environment Variable Only
        • Minimal Config File Examples
        • What Gets Enabled by Default
        • Targeted Instrumentation
        • Enabling Additional Features
        • Next Steps
      • Pipeline Configuration
        • Overview
        • Data Quality Limits
        • Signal Transformation
        • PII Redaction
        • Export Configuration
        • Operations
        • Environment Variables
        • Complete Example
      • Network Infra Firewalls
        • Supported firewalls
        • Example config
        • Runtime notes
      • Full Configuration Reference
        • Configuration File Locations
        • Core Configuration
        • Common Exporter Pipeline
        • OTLP Export Configuration
        • Agent Configuration
        • Collector Configuration
        • Queue Configuration
        • Retry Configuration
        • Self-Telemetry
        • Cloud Configuration
        • Signal Metadata
        • Next Steps
      • Agent Mode Configuration
        • Overview
        • When to Use Agent Mode
        • Minimal Agent Configuration
        • eBPF Configuration
        • Network Tracing
        • Process Discovery
        • Continuous Profiling
        • Security Monitoring
        • Log Collection
        • GPU Monitoring
        • Resource Limits
        • Kubernetes-Specific
        • Example: Mutual TLS to the Collector
        • Example: Performance-Optimized
        • Next Steps
      • Collector Mode Configuration
        • Overview
        • When to Use Collector Mode
        • Minimal Collector Configuration
        • SNMP Collection
        • SNMP Trap Receiver
        • SNMP Discovery
        • Storage Array Monitoring
        • Network Infrastructure APIs
        • Hybrid Mode
        • Resource Configuration
        • Example: Data Center Infrastructure
        • Next Steps
      • Environment Variables
        • Overview
        • Naming Convention
        • Core Variables
        • OTLP Export Variables
        • Agent Variables
        • Collector Variables
        • Cloud Variables
        • Self-Telemetry Variables
        • Queue Variables
        • Backoff Variables
        • Usage Examples
        • Precedence
        • Secret Substitution
        • Next Steps

Features

  • Features
    • Overview
    • Feature Categories
      • Core Observability
        • Auto-Discovery
        • Distributed Tracing
        • Log Collection & Trace Enrichment
        • Continuous Profiling
        • Kubernetes Metrics & Events Streaming
      • Messaging & RPC
        • Messaging Protocol Tracing
        • SunRPC (ONC RPC) Tracing
      • Security & Network
        • Security Observability
        • Network Observability
      • Infrastructure
        • Database Tracing
        • SNMP Receiver
        • Storage Adapters
      • Language-Specific
        • C/C++ Application Instrumentation
        • Go Channel-Link Events
      • Specialized
        • AI/ML Observability
        • Node Exporter Fusion
        • Unified Pipeline Architecture
    • Feature Matrix
  • Messaging Protocol Tracing
    • Overview
    • AMQP 0-9-1 (RabbitMQ)
      • Detected Operations
      • Destination Resolution
      • Sample Span
    • AMQP 1.0
      • Detected Performatives
      • Messaging System Disambiguation
    • OpenWire (ActiveMQ)
      • Detection
      • Sample Span
    • STOMP
      • Detected Commands
    • Kafka
      • Configuration
    • OpenTelemetry Attributes
    • Architecture
    • eBPF Implementation
      • Generic Tracer (kprobe-based)
      • Go Tracer (uprobe-based)
      • Parsers (userspace)
      • Transform Layer
    • Configuration
    • Metrics
    • Troubleshooting
      • AMQP 1.0 system not resolving correctly
      • STOMP frames not captured
      • RabbitMQ AMQP 0-9-1 ack spans missing destination
  • SunRPC (ONC RPC) Tracing
    • Overview
    • Protocol Details
    • Detected Program IDs
    • Span Details
      • SunRPC Client Span
      • SunRPC Server Span
    • Configuration
    • Integration
    • Limitations
    • Related Features
  • C/C++ Application Instrumentation
    • Overview
    • Supported Drivers
      • PostgreSQL
      • MySQL / MariaDB
      • MSSQL / SQL Server
      • Oracle
    • How It Works
      • Wire Protocol Capture (Generic Tracer)
      • Language Detection (Semconv Refinement)
    • Sample Span (C++ with libpq)
    • Configuration
    • Comparison: C/C++ vs Go vs Java
    • Limitations
    • Troubleshooting
      • C/C++ spans missing process.language=cpp
      • Database queries not captured
  • Go Channel-Link Events
    • Overview
    • How It Works
      • eBPF Uprobe Capture
      • Goexec Offset Resolution
      • Span Link Creation
    • Configuration
    • Span Attributes
      • Channel-Link Span Link
      • Channel Contention Event
    • Requirements
    • Limitations
    • Troubleshooting
      • Channel events not appearing
      • Incorrect span links
    • Related Features
  • Kubernetes Metrics & Events Streaming
    • Overview
    • Kube-State-Metrics Streaming
      • Configuration
      • Metrics Collected
      • Signal Metadata
    • cadvisor Streaming
      • Configuration
      • Metrics Collected
    • Kubernetes Events as OTLP Logs
      • Configuration
      • Sample Event Log
      • Event Types
    • Start-Order Independence
    • Health Endpoints
      • Telemetry Counters
    • Deployment
      • DaemonSet (Agent Mode)
      • RBAC
    • Configuration Reference
  • Unified Pipeline Architecture
    • High-Level Architecture
    • Signal Sources
    • Adapter Registry
    • Converting Pipeline
    • Integration Layer
      • Limits
      • Transforms
      • Signal Metadata
    • Persistent WAL Queues
      • Queue Structure
      • Queue Operations
      • Legacy Remote-Write Path
    • Multi-Endpoint Exporter
      • Export Modes
      • Circuit Breaker
      • Shared OTLP Clients
    • OBI Span Bridge
    • Runtime Sources
    • Multi-Worker Export
    • Configuration
      • Minimal (Zero-Config)
      • Full Pipeline Configuration
    • Migration from Legacy Pipeline

Integrations

  • Integrations
    • Overview
    • Topics
      • OpenTelemetry Collector Integration
        • Overview
        • Basic Setup
        • Deployment Patterns
        • Collector Processing
        • Multi-Tenant Setup
        • Load Balancing
        • High Availability
        • Security
        • Profiles (OTLP Profiles)
        • Example: Complete Production Setup
        • Next Steps
      • Backend Integrations
        • Overview
        • Grafana Cloud
        • Jaeger
        • Prometheus
        • Datadog
        • New Relic
        • Elastic APM
        • Splunk
        • Honeycomb
        • Lightstep (ServiceNow)
        • Azure Monitor
        • AWS X-Ray
        • Google Cloud Trace
        • Tempo (Grafana)
        • Mimir (Grafana Metrics)
        • Loki (Grafana Logs)
        • Pyroscope (Profiles)
        • Multi-Backend Fan-Out
        • Backend Selection Guide
        • Next Steps
    • Supported Backends
    • Quick Links

Guides

  • OBI Lineage and Upstream
    • Upstream dependency
    • Attribution
  • OBI Attribute Parity Check
    • Test coverage
    • Conversion behavior
    • Additions / differences
  • Telegen V3 Migration - Phase 0 Baseline and Legacy Parity Checklist
    • Baseline Evidence
    • Legacy Pipeline Parity Checklist
    • Deletion Gate
  • Telegen V3 Migration - Phase 1.1 Dependency Mapping (Report)
    • Scope and Method
    • Importers -> Vendored Paths -> Upstream Targets
      • 1) github.com/mirastacklabs-ai/telegen/cmd/telegen
      • 2) github.com/mirastacklabs-ai/telegen/internal/config
      • 3) github.com/mirastacklabs-ai/telegen/internal/instrumenter
      • 4) github.com/mirastacklabs-ai/telegen/internal/pipeline
      • 5) github.com/mirastacklabs-ai/telegen/internal/traces
      • 6) github.com/mirastacklabs-ai/telegen/internal/transform
      • 7) github.com/mirastacklabs-ai/telegen/internal/helpers/container
      • 8) github.com/mirastacklabs-ai/telegen/internal/helpers/msg
      • 9) github.com/mirastacklabs-ai/telegen/internal/ebpflogger
      • 10) github.com/mirastacklabs-ai/telegen/internal/ebpfwatcher
      • 11) github.com/mirastacklabs-ai/telegen/internal/profiler
      • 12) github.com/mirastacklabs-ai/telegen/dev/telegen/v3/internal/profiler
      • 13) github.com/mirastacklabs-ai/telegen/internal/kubei
      • 14) github.com/mirastacklabs-ai/telegen/internal/logs/filetailer
      • 15) github.com/mirastacklabs-ai/telegen/internal/cloud/unified
    • Blockers (Upstream Internal or Missing Equivalents)
    • Recommended Resolution Pattern for Blockers

Operations

  • Operations
    • Overview
    • Topics
      • Monitoring Telegen
        • Self-Telemetry
        • Key Metrics
        • Health Checks
        • Prometheus Scraping
        • Dashboard
        • Alerting
        • Logging
        • Status Commands
        • Tracing Telegen
        • Next Steps
      • Troubleshooting
        • Quick Diagnostics
        • Common Issues
        • Debug Mode
        • Getting Help
        • Next Steps
      • Upgrading Telegen
        • Version Compatibility
        • Pre-Upgrade Checklist
        • Kubernetes Upgrade
        • Docker Upgrade
        • Linux Package Upgrade
        • Configuration Migration
        • Zero-Downtime Upgrade
        • Post-Upgrade Verification
        • Troubleshooting Upgrades
        • Version-Specific Notes
        • Next Steps
      • Performance Tuning
        • Resource Guidelines
        • Ring Buffer Tuning
        • CPU Optimization
        • Memory Optimization
        • Network/Export Optimization
        • Sampling
        • Per-Feature Tuning
        • High-Volume Environments
        • Low-Resource Environments
        • Monitoring Performance
        • Benchmarking
        • Best Practices Summary
        • Next Steps
    • Quick Links

Reference

  • Reference
    • Overview
    • Topics
      • Metrics Reference
        • Self-Telemetry Metrics
        • Node Metrics (node_exporter Compatible)
        • GPU Metrics
        • LLM Inference Metrics
        • Network Flow Metrics
        • Database Metrics
        • Connection Statistics Metrics
        • Kafka Consumer Group Metrics
        • SNMP Metrics
        • Storage Array Metrics
        • Security Metrics
        • Kubernetes Metrics
        • Metric Labels
        • Metric Naming Conventions
        • Next Steps
      • Telegen Signals Reference
        • Table of Contents
        • eBPF Application Metrics
        • eBPF Application Traces
        • Network Flow Metrics
        • Service Graph Metrics
        • Span Metrics
        • Profiler Metrics
        • Node Exporter Metrics
        • Kubernetes State Metrics
        • GPU / AI-ML Metrics
        • DNS Metrics
        • Self-Telemetry Metrics
        • Sentiment Value Reference
        • Next Steps
      • VMware vCenter → MIRASTACK Data Studio Query Reference
        • 1. Overview and caveats
        • 2. Metrics catalog
        • 3. Logs catalog
        • 4. Example dashboards
        • Appendix A — Full raw metric name list
        • Appendix B — Excluded: cloud “unified” REST collector
      • NetApp ONTAP → MIRASTACK Data Studio Query Reference
        • 1. Overview and caveats
        • 2. Metrics catalog
        • 3. Logs catalog (EMS)
        • 4. Example dashboards
        • Appendix A — Enumerating metric names
        • Appendix B — Config sketch
        • Appendix C — E-Series (brief)
        • Appendix D — Catalog parity
      • Semantic Conventions
        • Overview
        • Resource Attributes
        • HTTP Span Attributes
        • gRPC Span Attributes
        • Database Span Attributes
        • Messaging Span Attributes
        • Network Attributes
        • Exception Attributes
        • Span Status
        • Span Kind
        • Metric Semantic Conventions
        • Log Semantic Conventions
        • Telegen-Specific Attributes
        • Best Practices
        • Next Steps
      • CLI Reference
        • Synopsis
        • Global Flags
        • Commands
        • Environment Variables
        • Exit Codes
        • Signal Handling
        • Debugging
        • Examples
        • Next Steps
      • API Reference
        • Overview
        • Health Endpoints
        • Metrics Endpoint
        • Status Endpoints
        • Configuration Endpoint
        • Debug Endpoints
        • Admin Endpoints
        • Authentication
        • Rate Limiting
        • CORS
        • Error Responses
        • API Versioning
        • OpenAPI Specification
        • Next Steps
    • Quick Links
Telegen
  • Features
  • Go Channel-Link Events
  • View page source

Go Channel-Link Events

Telegen can capture Go channel send/receive operations as span links, connecting producer and consumer goroutines in distributed tracing. This provides end-to-end visibility across goroutine boundaries without any code changes.


Overview

Go channels are the primary synchronization mechanism in Go programs. When a goroutine sends on a channel and another receives, there is no automatic trace linkage — the producer and consumer spans are disconnected.

Telegen solves this by:

  1. Capturing channel operations via eBPF uprobes on Go runtime internals

  2. Extracting channel metadata (hchan struct address, element size, buffer state)

  3. Creating span links that connect the send operation to the receive operation


How It Works

eBPF Uprobe Capture

Telegen attaches uprobes to Go runtime functions:

  • runtime.chansend — channel send operation

  • runtime.chanrecv — channel receive operation

These uprobes capture:

  • The hchan struct pointer (unique per channel instance)

  • Whether the channel is buffered or unbuffered

  • Whether the operation blocked (channel contention)

  • Goroutine ID of the sender/receiver

Goexec Offset Resolution

Go binaries store struct member offsets in the runtime._hchan type. Telegen uses internal/goexec/offsets.go to resolve:

  • hchan.buf — buffer pointer

  • hchan.elemsize — element size

  • hchan.recvq / hchan.sendq — wait queues

These offsets are resolved at startup by parsing the Go binary’s type information.

Span Link Creation

When a send and receive on the same hchan address are detected within a time window:

  1. The send span is enriched with a span link pointing to the receiving goroutine’s span (or vice versa)

  2. Both spans carry the hchan address as a link attribute for correlation

  3. Channel contention (blocked send/receive) is recorded as a span event


Configuration

Channel-link events come from the Go uprobes, which attach automatically to Go binaries once eBPF instrumentation is on. There is no gotracer section, and the send/receive matching window is fixed:

ebpf:
  enabled: true

To opt out for a host, keep the generic tracers only:

ebpf:
  discovery:
    skip_go_specific_tracers: true

Span Attributes

Channel-Link Span Link

span:
  name: "goroutine.channel.send"
  kind: INTERNAL
  attributes:
    go.channel.hchan: "0x7f8a40001234"   # hchan struct address
    go.channel.buffered: true
    go.channel.blocked: false
  links:
    - trace_id: "abc123..."
      span_id: "def456..."
      attributes:
        go.channel.operation: "receive"
        go.channel.goroutine: 42

Channel Contention Event

When a channel operation blocks (no buffer space or no ready receiver):

span_events:
  - name: "channel.blocked"
    attributes:
      go.channel.hchan: "0x7f8a40001234"
      go.channel.operation: "send"
      go.channel.wait_ns: 1500000   # 1.5ms wait time

Requirements

Requirement

Details

Go binary

Must be a standard Go binary (not stripped of symbols)

Go version

Go 1.18+ (tested up to Go 1.22)

Symbol resolution

runtime.chansend and runtime.chanrecv symbols must be present

Permissions

SYS_PTRACE capability or equivalent for uprobe attachment


Limitations

  • Stripped binaries — If the Go binary is stripped (no symbol table), uprobes cannot attach. Use go build -ldflags="-s -w" only when channel tracing is not needed.

  • Best-effort matching — Span link matching uses a time window and hchan address. In high-throughput scenarios with channel reuse, links may be approximate.

  • Cross-pod correlation — Channel links only work within a single process. Cross-pod Go channel communication (via network) is traced at the HTTP/gRPC layer, not the channel layer.

  • Third-party Go libraries — Channel operations inside vendored or third-party code are captured as long as they use the standard runtime.chansend/runtime.chanrecv paths.


Troubleshooting

Channel events not appearing

  1. Verify the Go tracer is enabled: gotracer.enabled: true

  2. Check that the Go binary has symbols: nm <binary> | grep chansend

  3. Check agent logs for uprobe attachment errors: journalctl -u telegen | grep gotracer

Incorrect span links

Channel link matching is best-effort. If you see incorrect links, try increasing the channel_link_window to account for longer goroutine scheduling delays.


Related Features

  • Go application tracing — Go channel events complement HTTP/gRPC/SQL tracing for complete goroutine-level observability

  • Continuous profiling — Go channel contention events can be correlated with CPU profiling data to identify blocking channels

  • eBPF runtime sources — Channel events are part of the unified V3 pipeline’s eBPF signal sources

Previous Next

© Copyright 2026, Telegen Authors.

Built with Sphinx using a theme provided by Read the Docs.