Make OTLP initialization more generic and add exporters #3
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.
In reference to authzed/spicedb#14, this enables the OpenTelemetry OTLP/HTTP and OTLP/GRPC exporters. Since just about all of the code except for creating the exporter was common with the existing Jaeger implementation, we abstracted out the tracer initiation.
We wanted to get some early feedback on this before it went further, as we had some choices to make. We wanted to make the new exporters work, but also wanted to have the most flexibility and not change this external library too much.
Some points to consider:
jaeger
, but since they were common they were renamed tootel-endpoint
andotel-service-name
.OTEL_EXPORTER_OTLP_ENDPOINT
orOTEL_EXPORTER_OTLP_TRACES_ENDPOINT
.OTEL_JAEGER_EXPORTER_ENDPOINT
could be used instead of a command line flag for the Jaeger exporter, which would require removing theMust
checks.OTEL_SERVICE_NAME
is never used, since the service name is either set on the command line, or derived from the runtime.Since this is a standalone library, we can change what we've done to keep the interfaces somewhat consistent.