feat: add ability to send metrics to generic OTLP ingest point. DRY up code to avoid duplication since a lot of it is shared. #34
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.
Lightstep is not the only provider of metrics with an OTLP ingestion URL. This PR adds the ability for consumers to use any OTLP ingestion point for sending metrics.
Maintains backwards compatibilility with consumers of original APIs without changing business logic. A lot of the code is shared, so this was DRY'd up to keep things tidy.
Finally, made
opentelemetryClient()
apublic
function. This allows consumers to write extension functions local to their own code to support features like bifrocated metrics ingestion (e.g. I want to send my metrics to providers X and Y) without pigeon-holing thegoometrics
library itself to support this.