Export metrics to a working endpoint when is OTEL_REALM set #2637
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.
Fixes #2582
Initially I tried reusing https://pkg.go.dev/go.opentelemetry.io/contrib/exporters/autoexport, but it resulted in too many changes that I was not comfortable with. The changes were not only related to "code", but in code that we would have to add to not break existing users (e.g. by default our distro uses insecure channel).
Testing
Here is a list manual E2E test scenarios using our example that I did to ensure that the functionality is working properly:
Via Collector
✔️
Default scenario. Setting only
OTEL_SERVICE_NAME
andOTEL_RESOURCE_ATTRIBUTES
on the application. Use collector to send telemetry to Splunk o11y.Direct Ingest
✔️
Additionally set
SPLUNK_REALM
andSPLUNK_ACCESS_TOKEN
to send telemetry directly to Splunk o11y.