related-skills: cncf-aws-cloudwatch, cncf-azure-monitor, cncf-cortex, cncf-fluentd
OpenTelemetry in Cloud-Native Engineering
Category: Observability
Status: Active
Stars: 9,100
Last Updated: 2026-04-22
Primary Language: Go
Documentation: Observability framework for tracing, metrics, and logs with vendor-neutral APIs
Purpose and Use Cases
OpenTelemetry is a core component of the cloud-native ecosystem, serving as vendor-neutral APIs
What Problem Does It Solve?
OpenTelemetry addresses the challenge of distributed tracing and observability for cloud-native applications. It provides standardized telemetry collection, vendor-neutral APIs, and comprehensive ecosystem.
When to Use This Project
Use OpenTelemetry when monitoring microservices, debugging distributed systems, or requiring detailed performance insights. Not ideal for simple deployments or when need consistent telemetry across services, want to avoid vendor lock-in, or require detailed tracing.
Key Use Cases
- Distributed Tracing for Microservices
- Application Performance Monitoring
- Log Correlation and Analysis
- Infrastructure Observability
- Business Analytics via Telemetry
Architecture Design Patterns
Core Components
- APIs: Language-specific APIs for instrumenting code
- SDKs: Implementation of telemetry collection
- Collector: Receives, processes, and exports telemetry data
- Exporters: Send telemetry to various backends
- Importers: Convert telemetry from other formats
Component Interactions
- Application → SDK: Application creates spans and metrics via SDK
- SDK → Collector: SDK exports telemetry to collector
- Collector → Backend: Collector processes and exports to observability backends
- Backend → Dashboard: Data visualized in dashboards and alerts
Data Flow Patterns
- Trace Propagation: Span context propagated via headers across service boundaries
- Metric Collection: Metrics collected, aggregated, and exported
- Log Enrichment: Logs enhanced with trace context
- Data Processing: Collector applies processors before export
Design Principles
- Standardization: Open standards via CNCF specification
- Backward Compatibility: Support existing instrumentation
- Performance: Low overhead design
- Vendor Neutrality: No lock-in to specific backend
Integration Approaches
Integration with Other CNCF Projects
- Prometheus: Metrics collection integration
- Jaeger: Tracing backend
- Zipkin: Alternative tracing backend
- OTLP: OpenTelemetry Protocol for data exchange
API Patterns
- Tracer API: Create and manage spans
- Meter API: Create and record metrics
- Logger API: Create and enrich logs
- Propagators: Trace context propagation
Configuration Patterns
- YAML Configuration: Collector configuration
- Environment Variables: Runtime configuration
- Helm Chart: Kubernetes deployment
Extension Mechanisms
- Custom Exporters: Send telemetry to proprietary backends
- Custom Processors: Transform telemetry data
- Custom Receivers: Receive telemetry from sources
Common Pitfalls and How to Avoid Them
Misconfigurations
- High Cardinality: Too many unique metric labels
- How to Avoid: Use cardinality limits, review label values
- Trace Context Loss: Trace IDs not propagated between services
- How to Avoid: Ensure propagators configured, check header propagation
Performance Issues
- Instrumentation Gaps: Missing coverage in code
- How to Avoid: Use auto-instrumentation, review coverage
- Security Exposure: Sensitive data in spans
- How to Avoid: Implement redaction, use secure exporters
Operational Challenges
- Configuration Drift: Inconsistent configs across services
- How to Avoid: Centralize configuration, use version control
- Network Bottlenecks: Collector network saturation
- How to Avoid: Scale collectors, use aggregation
Security Pitfalls
Coding Practices
Idiomatic Configuration
- Span Management: Create spans for meaningful operations
- Attribute Naming: Use consistent attribute naming conventions
- Sampling Configuration: Configure sampling rates appropriately
API Usage Patterns
- Manual Instrumentation: Add spans programmatically
- Auto-Instrumentation: Use agent-based instrumentation
- Context Propagation: Propagate trace context in headers
Observability Best Practices
- Metric Aggregation: Pre-aggregate metrics where possible
- Span Attributes: Include relevant contextual attributes
- Log Correlation: Include trace IDs in logs
Testing Strategies
- Unit Tests: Test instrumentation logic
- Integration Tests: Test end-to-end telemetry flow
- Performance Tests: Validate overhead levels
Development Workflow
- Local Development: Use local collector and backend
- Debug Commands: Use otel-cli for testing
- Test Environment: Set up isolated observability stack
- CI/CD Integration: Automate telemetry testing
- Monitoring Setup: Configure alerting on metrics
- Documentation: Maintain instrumentation guides
Fundamentals
Essential Concepts
- Trace: Request flow through services
- Span: Individual operation within a trace
- Span Context: Trace state propagated between services
- Span Kind: Types: SERVER, CLIENT, PRODUCER, CONSUMER
- Metric: Numerical data point
- Histogram: Distribution of values
- Gauge: Single numerical value
- Counter: Monotonically increasing metric
- Logger: Log record with attributes
- Resource: Entity producing telemetry
- Scope: Instrumentation library
- Exporter: Sends telemetry to backend
- Processor: Transforms telemetry data
- Collector: Receives and processes telemetry
Terminology Glossary
- OTLP: OpenTelemetry Protocol
- SDK: Software Development Kit
- API: Application Programming Interface
- Sampler: Decides if spans are sampled
- ** Propagator**: Handles context propagation
- Exporter: Sends data to backend
Data Models and Types
- SpanData: Span information and attributes
- MetricData: Metric points and aggregations
- LogRecord: Log entry with attributes
- ResourceData: Resource attributes
- ScopeData: Instrumentation scope
Lifecycle Management
- Trace Lifecycle: Start trace → Create spans → Propagate → End
- Metric Lifecycle: Create instrument → Record points → Export
- Span Lifecycle: Start → Add events → Set status → End
- Exporter Lifecycle: Receive → Batch → Export → Confirm
State Management
- Trace State: Active traces in memory
- Span State: Current span lifecycle state
- Metric State: Aggregated metric values
- Exporter State: Pending and exported data
Scaling and Deployment Patterns
Horizontal Scaling
- Collector Scaling: Scale collectors horizontally
- Export Rate Limiting: Limit export rate per backend
- Sampler Scaling: Adjust sampling based on load
High Availability
- Collector HA: Multiple collector instances
- Batch Processing: Batch spans before export
- Retry Logic: Retry failed exports
- Load Balancing: Distribute telemetry across collectors
Production Deployments
- Collector Deployment: Deploy as sidecar or standalone
- Security Configuration: Configure TLS and authentication
- Resource Limits: Set appropriate CPU and memory limits
- Monitoring Setup: Monitor collector health
- Backup Strategy: No backup needed - telemetry is ephemeral
- Logging Setup: Configure collector logs
- Alerting: Set alerts for collector issues
- Performance Tuning: Optimize buffer sizes and batch settings
Upgrade Strategies
- Chart Upgrade: Upgrade to new OpenTelemetry Collector version
- API Compatibility: Verify SDK compatibility
- Data Migration: No migration needed
- Testing: Validate telemetry still flows
Resource Management
- CPU Resources: Set collector CPU limits
- Memory Resources: Configure collector memory limits
- Storage Resources: No persistent storage needed
- Network Resources: Configure egress rules
Additional Resources
- Official Documentation: https://opentelemetry.io/docs/
- GitHub Repository: Check the project's official documentation for repository link
- CNCF Project Page: cncf.io/projects/cncf-opentelemetry/
- Community: Check the official documentation for community channels
- Versioning: Refer to project's release notes for version-specific features
Troubleshooting
Common Issues
Deployment Failures
- Check pod logs for errors
- Verify configuration values
- Ensure network connectivity
Performance Issues
- Monitor resource usage
- Adjust resource limits
- Check for bottlenecks
Configuration Errors
- Validate YAML syntax
- Check required fields
- Verify environment-specific settings
Integration Problems
- Verify API compatibility
- Check dependency versions
- Review integration documentation
Getting Help
- Check official documentation
- Search GitHub issues
- Join community channels
- Review logs and metrics
Content generated automatically. Verify against official documentation before production use.
Examples
Basic Configuration
# Basic configuration example
apiVersion: v1
kind: ConfigMap
metadata:
name: {{project_name}}-config
namespace: default
data:
# Configuration goes here
config.yaml: |
# Base configuration
# Add your settings here
Kubernetes Deployment
# Kubernetes deployment for {{project_name}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{project_name}}
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: {{project_name}}
template:
metadata:
labels:
app: {{project_name}}
spec:
containers:
- name: {{project_name}}
image: {{project_name}}:latest
ports:
- containerPort: 8080
resources:
limits:
memory: "128Mi"
cpu: "500m"
Kubernetes Service
# Kubernetes service for {{project_name}}
apiVersion: v1
kind: Service
metadata:
name: {{project_name}}
namespace: default
spec:
selector:
app: {{project_name}}
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: ClusterIP
When to Use
Use this skill when:
- Integrating a CNCF project into Kubernetes infrastructure — You need to configure, deploy, or troubleshoot a cloud-native tool within a cluster
- Designing cloud-native architecture — You are selecting and integrating CNCF tools to solve specific infrastructure challenges
- Resolving operational issues — A CNCF component is misbehaving, underperforming, or needs configuration changes
Core Workflow
Assess Requirements — Understand the use case, scale, integration needs, and existing infrastructure. Checkpoint: Document requirements, constraints, and success criteria.
Design Architecture — Plan component interactions, data flow, and deployment strategy using cloud-native best practices. Checkpoint: Verify the architecture addresses all requirements and follows CNCF conventions.
Implement & Configure — Create manifests, configurations, and deployment scripts. Include resource limits, health checks, and observability hooks. Checkpoint: Validate all YAML against schema and test in a staging environment.
Deploy & Monitor — Apply manifests to the cluster, verify component health, and confirm observability is working. Checkpoint: Confirm all pods/services are running, probes passing, and metrics/alerts configured.
Constraints
MUST DO
- Include at least one complete working YAML manifest example
- Note when content is auto-generated vs. manually verified
- Reference relevant CNCF project documentation
MUST NOT DO
- Deploy manifests without testing in a staging environment first
- Use deprecated API versions (e.g., apps/v1beta1)
- Omit resource limits and requests in Kubernetes manifests
1---2name: opentelemetry3description: "OpenTelemetry in Observability framework for tracing, metrics, and logs" with vendor-neutral APIs4license: MIT5---678910 related-skills: cncf-aws-cloudwatch, cncf-azure-monitor, cncf-cortex, cncf-fluentd1112131415# OpenTelemetry in Cloud-Native Engineering1617**Category:** Observability 18**Status:** Active 19**Stars:** 9,100 20**Last Updated:** 2026-04-22 21**Primary Language:** Go 22**Documentation:** [Observability framework for tracing, metrics, and logs with vendor-neutral APIs](https://opentelemetry.io/docs/) 2324---2526## Purpose and Use Cases2728OpenTelemetry is a core component of the cloud-native ecosystem, serving as vendor-neutral APIs2930### What Problem Does It Solve?3132OpenTelemetry addresses the challenge of distributed tracing and observability for cloud-native applications. It provides standardized telemetry collection, vendor-neutral APIs, and comprehensive ecosystem.3334### When to Use This Project3536Use OpenTelemetry when monitoring microservices, debugging distributed systems, or requiring detailed performance insights. Not ideal for simple deployments or when need consistent telemetry across services, want to avoid vendor lock-in, or require detailed tracing.3738### Key Use Cases3940- Distributed Tracing for Microservices41- Application Performance Monitoring42- Log Correlation and Analysis43- Infrastructure Observability44- Business Analytics via Telemetry4546---4748## Architecture Design Patterns4950### Core Components5152- **APIs**: Language-specific APIs for instrumenting code53- **SDKs**: Implementation of telemetry collection54- **Collector**: Receives, processes, and exports telemetry data55- **Exporters**: Send telemetry to various backends56- **Importers**: Convert telemetry from other formats5758### Component Interactions59601. **Application → SDK**: Application creates spans and metrics via SDK611. **SDK → Collector**: SDK exports telemetry to collector621. **Collector → Backend**: Collector processes and exports to observability backends631. **Backend → Dashboard**: Data visualized in dashboards and alerts6465### Data Flow Patterns66671. **Trace Propagation**: Span context propagated via headers across service boundaries681. **Metric Collection**: Metrics collected, aggregated, and exported691. **Log Enrichment**: Logs enhanced with trace context701. **Data Processing**: Collector applies processors before export7172### Design Principles7374- **Standardization**: Open standards via CNCF specification75- **Backward Compatibility**: Support existing instrumentation76- **Performance**: Low overhead design77- **Vendor Neutrality**: No lock-in to specific backend7879---8081## Integration Approaches8283### Integration with Other CNCF Projects8485- **Prometheus**: Metrics collection integration86- **Jaeger**: Tracing backend87- **Zipkin**: Alternative tracing backend88- **OTLP**: OpenTelemetry Protocol for data exchange8990### API Patterns9192- **Tracer API**: Create and manage spans93- **Meter API**: Create and record metrics94- **Logger API**: Create and enrich logs95- **Propagators**: Trace context propagation9697### Configuration Patterns9899- **YAML Configuration**: Collector configuration100- **Environment Variables**: Runtime configuration101- **Helm Chart**: Kubernetes deployment102103### Extension Mechanisms104105- **Custom Exporters**: Send telemetry to proprietary backends106- **Custom Processors**: Transform telemetry data107- **Custom Receivers**: Receive telemetry from sources108109---110111## Common Pitfalls and How to Avoid Them112113### Misconfigurations114115- **High Cardinality**: Too many unique metric labels116 - **How to Avoid**: Use cardinality limits, review label values117- **Trace Context Loss**: Trace IDs not propagated between services118 - **How to Avoid**: Ensure propagators configured, check header propagation119120### Performance Issues121122- **Instrumentation Gaps**: Missing coverage in code123 - **How to Avoid**: Use auto-instrumentation, review coverage124- **Security Exposure**: Sensitive data in spans125 - **How to Avoid**: Implement redaction, use secure exporters126127### Operational Challenges128129- **Configuration Drift**: Inconsistent configs across services130 - **How to Avoid**: Centralize configuration, use version control131- **Network Bottlenecks**: Collector network saturation132 - **How to Avoid**: Scale collectors, use aggregation133134### Security Pitfalls135136137---138139## Coding Practices140141### Idiomatic Configuration142143- **Span Management**: Create spans for meaningful operations144- **Attribute Naming**: Use consistent attribute naming conventions145- **Sampling Configuration**: Configure sampling rates appropriately146147### API Usage Patterns148149- **Manual Instrumentation**: Add spans programmatically150- **Auto-Instrumentation**: Use agent-based instrumentation151- **Context Propagation**: Propagate trace context in headers152153### Observability Best Practices154155- **Metric Aggregation**: Pre-aggregate metrics where possible156- **Span Attributes**: Include relevant contextual attributes157- **Log Correlation**: Include trace IDs in logs158159### Testing Strategies160161- **Unit Tests**: Test instrumentation logic162- **Integration Tests**: Test end-to-end telemetry flow163- **Performance Tests**: Validate overhead levels164165### Development Workflow166167- **Local Development**: Use local collector and backend168- **Debug Commands**: Use otel-cli for testing169- **Test Environment**: Set up isolated observability stack170- **CI/CD Integration**: Automate telemetry testing171- **Monitoring Setup**: Configure alerting on metrics172- **Documentation**: Maintain instrumentation guides173174---175176## Fundamentals177178### Essential Concepts179180- **Trace**: Request flow through services181- **Span**: Individual operation within a trace182- **Span Context**: Trace state propagated between services183- **Span Kind**: Types: SERVER, CLIENT, PRODUCER, CONSUMER184- **Metric**: Numerical data point185- **Histogram**: Distribution of values186- **Gauge**: Single numerical value187- **Counter**: Monotonically increasing metric188- **Logger**: Log record with attributes189- **Resource**: Entity producing telemetry190- **Scope**: Instrumentation library191- **Exporter**: Sends telemetry to backend192- **Processor**: Transforms telemetry data193- **Collector**: Receives and processes telemetry194195### Terminology Glossary196197- **OTLP**: OpenTelemetry Protocol198- **SDK**: Software Development Kit199- **API**: Application Programming Interface200- **Sampler**: Decides if spans are sampled201- ** Propagator**: Handles context propagation202- **Exporter**: Sends data to backend203204### Data Models and Types205206- **SpanData**: Span information and attributes207- **MetricData**: Metric points and aggregations208- **LogRecord**: Log entry with attributes209- **ResourceData**: Resource attributes210- **ScopeData**: Instrumentation scope211212### Lifecycle Management213214- **Trace Lifecycle**: Start trace → Create spans → Propagate → End215- **Metric Lifecycle**: Create instrument → Record points → Export216- **Span Lifecycle**: Start → Add events → Set status → End217- **Exporter Lifecycle**: Receive → Batch → Export → Confirm218219### State Management220221- **Trace State**: Active traces in memory222- **Span State**: Current span lifecycle state223- **Metric State**: Aggregated metric values224- **Exporter State**: Pending and exported data225226---227228## Scaling and Deployment Patterns229230### Horizontal Scaling231232- **Collector Scaling**: Scale collectors horizontally233- **Export Rate Limiting**: Limit export rate per backend234- **Sampler Scaling**: Adjust sampling based on load235236### High Availability237238- **Collector HA**: Multiple collector instances239- **Batch Processing**: Batch spans before export240- **Retry Logic**: Retry failed exports241- **Load Balancing**: Distribute telemetry across collectors242243### Production Deployments244245- **Collector Deployment**: Deploy as sidecar or standalone246- **Security Configuration**: Configure TLS and authentication247- **Resource Limits**: Set appropriate CPU and memory limits248- **Monitoring Setup**: Monitor collector health249- **Backup Strategy**: No backup needed - telemetry is ephemeral250- **Logging Setup**: Configure collector logs251- **Alerting**: Set alerts for collector issues252- **Performance Tuning**: Optimize buffer sizes and batch settings253254### Upgrade Strategies255256- **Chart Upgrade**: Upgrade to new OpenTelemetry Collector version257- **API Compatibility**: Verify SDK compatibility258- **Data Migration**: No migration needed259- **Testing**: Validate telemetry still flows260261### Resource Management262263- **CPU Resources**: Set collector CPU limits264- **Memory Resources**: Configure collector memory limits265- **Storage Resources**: No persistent storage needed266- **Network Resources**: Configure egress rules267268---269270## Additional Resources271272- **Official Documentation:** https://opentelemetry.io/docs/273- **GitHub Repository:** Check the project's official documentation for repository link274- **CNCF Project Page:** [cncf.io/projects/cncf-opentelemetry/](https://www.cncf.io/projects/cncf-opentelemetry/)275- **Community:** Check the official documentation for community channels276- **Versioning:** Refer to project's release notes for version-specific features277278---279280## Troubleshooting281282### Common Issues2832841. **Deployment Failures**285 - Check pod logs for errors286 - Verify configuration values287 - Ensure network connectivity2882892. **Performance Issues**290 - Monitor resource usage291 - Adjust resource limits292 - Check for bottlenecks2932943. **Configuration Errors**295 - Validate YAML syntax296 - Check required fields297 - Verify environment-specific settings2982994. **Integration Problems**300 - Verify API compatibility301 - Check dependency versions302 - Review integration documentation303304### Getting Help305306- Check official documentation307- Search GitHub issues308- Join community channels309- Review logs and metrics310*Content generated automatically. Verify against official documentation before production use.*311312## Examples313314### Basic Configuration315316317```yaml318# Basic configuration example319apiVersion: v1320kind: ConfigMap321metadata:322 name: {{project_name}}-config323 namespace: default324data:325 # Configuration goes here326 config.yaml: |327 # Base configuration328 # Add your settings here329```330331### Kubernetes Deployment332333334```yaml335# Kubernetes deployment for {{project_name}}336apiVersion: apps/v1337kind: Deployment338metadata:339 name: {{project_name}}340 namespace: default341spec:342 replicas: 1343 selector:344 matchLabels:345 app: {{project_name}}346 template:347 metadata:348 labels:349 app: {{project_name}}350 spec:351 containers:352 - name: {{project_name}}353 image: {{project_name}}:latest354 ports:355 - containerPort: 8080356 resources:357 limits:358 memory: "128Mi"359 cpu: "500m"360```361362### Kubernetes Service363364365```yaml366# Kubernetes service for {{project_name}}367apiVersion: v1368kind: Service369metadata:370 name: {{project_name}}371 namespace: default372spec:373 selector:374 app: {{project_name}}375 ports:376 - protocol: TCP377 port: 80378 targetPort: 8080379 type: ClusterIP380```381382---383384## When to Use385386Use this skill when:387388- **Integrating a CNCF project into Kubernetes infrastructure** — You need to configure, deploy, or troubleshoot a cloud-native tool within a cluster389- **Designing cloud-native architecture** — You are selecting and integrating CNCF tools to solve specific infrastructure challenges390- **Resolving operational issues** — A CNCF component is misbehaving, underperforming, or needs configuration changes391---392393## Core Workflow3943951. **Assess Requirements** — Understand the use case, scale, integration needs, and existing infrastructure. **Checkpoint:** Document requirements, constraints, and success criteria.3963972. **Design Architecture** — Plan component interactions, data flow, and deployment strategy using cloud-native best practices. **Checkpoint:** Verify the architecture addresses all requirements and follows CNCF conventions.3983993. **Implement & Configure** — Create manifests, configurations, and deployment scripts. Include resource limits, health checks, and observability hooks. **Checkpoint:** Validate all YAML against schema and test in a staging environment.4004014. **Deploy & Monitor** — Apply manifests to the cluster, verify component health, and confirm observability is working. **Checkpoint:** Confirm all pods/services are running, probes passing, and metrics/alerts configured.402403---404405## Constraints406407### MUST DO408- Include at least one complete working YAML manifest example409- Note when content is auto-generated vs. manually verified410- Reference relevant CNCF project documentation411412### MUST NOT DO413- Deploy manifests without testing in a staging environment first414- Use deprecated API versions (e.g., apps/v1beta1)415- Omit resource limits and requests in Kubernetes manifests