This repository was archived by the owner on Dec 5, 2025. It is now read-only.
[WIP] Fix issue with open telemetry integration #8
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.
✅ Resolved: Add support for OTEL_EXPORTER_OTLP_HEADERS (#6)
Issue #6 asked: "Is there something like
OTEL_EXPORTER_OTLP_HEADERthat i can use to send my auth headers to otel service?"Answer: YES! The standard
OTEL_EXPORTER_OTLP_HEADERSenvironment variable is already fully supported by the OpenTelemetry PHP SDK. This PR adds comprehensive documentation to help users discover and use this feature.Changes Made
All changes are documentation-only - the feature already works, we just needed to document it!
📄 Files Modified/Created:
📊 Statistics:
How to Use (Solution to Issue #6)
Simply add the
OTEL_EXPORTER_OTLP_HEADERSenvironment variable to your.envfile:Real-World Examples:
Honeycomb:
New Relic:
Testing
Users can verify their configuration:
With environment variables:
OTEL_EXPORTER_OTLP_HEADERS="x-api-key=test" php examples/authentication_example.phpKey Benefits
✅ No code changes required - standard OpenTelemetry SDK feature
✅ Works with all authentication methods (API keys, bearer tokens, basic auth)
✅ Supports multiple headers with comma-separated format
✅ Compatible with all major observability platforms
✅ Comprehensive documentation and examples provided
✅ Includes verification script for testing
This PR makes it easy for users to authenticate with their OTLP collectors and observability platforms.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.