Add OpenTelemetry OTLP exporter with full SDK support #218
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds production-ready OpenTelemetry Protocol (OTLP) exporter using the official OpenTelemetry SDK with comprehensive support for both gRPC and HTTP/Protobuf transports.
Features
✅ Dual Transport Support: gRPC and HTTP/Protobuf protocols
✅ Environment Variables: Full
OTEL_*environment variable support✅ Resource Detection: AWS (EC2, ECS, EKS, Lambda), GCP, Azure, K8s, host, process
✅ All Metric Types: Counter, Gauge, Histogram with proper semantics
✅ Tag Conversion: Automatic stats tags → OpenTelemetry attributes
✅ Production Ready: Thread-safe, tested, documented
Usage
Implementation Highlights
UpDownCounterwith delta calculation to maintain absolute value semantics (workaround until stable OTel SDK adds Gauge)Documentation
Testing
Changes
otlp/sdk_handler.go- Main OpenTelemetry SDK integrationotlp/sdk_handler_test.go- Comprehensive testsotlp/example_test.go- Usage examplesotlp/README.md- Complete documentationotlp/IMPLEMENTATION_NOTES.md- Design decisionsREADME.md- Added OpenTelemetry backend overviewHISTORY.md- Added v5.9.0 release notesversion/version.go- Bumped to 5.9.0otlp/go.mod- Added OpenTelemetry SDK dependenciesBackward Compatibility
✅ Fully backward compatible - This is a new feature addition that doesn't change existing APIs. The legacy
otlp.Handlerremains available for existing users.🤖 Generated with Claude Code