Adding opentelemetry-distro package and entrypoint#1482
Adding opentelemetry-distro package and entrypoint#1482codeboten merged 19 commits intoopen-telemetry:masterfrom
Conversation
| EXPORTER_OTLP_SPAN = "otlp_span" | ||
| EXPORTER_OTLP_METRIC = "otlp_metric" | ||
| _DEFAULT_EXPORTER = EXPORTER_OTLP | ||
| _DEFAULT_EXPORTER = "none" |
There was a problem hiding this comment.
this is changing the default in the SDK configurator not to make a decision for users as to what exporter to configure
There was a problem hiding this comment.
Why not remove the line completely?
|
Curious what is the execution order of things in |
ocelotl
left a comment
There was a problem hiding this comment.
I think the nomenclature here is a bit confusing. We have a Distro class that does configuration. Actually, what we have here is not only a way to perform configuration but a hook that allows users to register some code to be executed before the instrumentors are executed, right?
I don't want to over-generalize this, but maybe users will also need to run stuff after the instrumentors? Is this an opportunity to provide a more general-purpose hook mechanism? I understand if you don't want to spend much time in these abstract design or philosophical questions, just mentioning this just in case this brings in you any valuable idea.
Any way, I believe the Distro name is not very appropriate, maybe something more precise like BeforeInstrumentors would fit better? 🤷♂️
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
|
|
||
| [options.entry_points] | ||
| opentelemetry_distro = | ||
| distro = opentelemetry.distro:OpenTelemetryDistro |
There was a problem hiding this comment.
This is the default Opentelemetry distro right? What would other distros be called?
azure = opentelemetry.distro:AzureDistro something like this?
There was a problem hiding this comment.
i'd originally called it otel_distro, but based on @ocelotl's feedback changed it to distro. I don't feel strongly one way or the other on this. I would expect the distro to match the vendor, as you suggested, azure would identify the Azure distro. in that case maybe this would make more sense as otel
There was a problem hiding this comment.
I personally think it's best to prefix everything with an "opentelemetry" identifier just in case there are other libraries using a similar name within the entry points.
lzchen
left a comment
There was a problem hiding this comment.
Nice. Just one non-blocking comment.
|
@ocelotl: The term This PR is moving code that was doing some default configuration out of the SDK and into a distro that can be used as-is by users. This also serves as an example for how others could implement their own distro, with whatever defaults makes sense for them. |
Ok, sounds good 👍 Approving 😎 |
Description
As per the discussion in the SIG meeting on 12/03, providing an entrypoint that is loaded before the configurator would reduce the amount of work needed by users in creating distro's for otel python. This PR proposes that change by introducing an
opentelemetry_distroentrypoint, as well as a distro that configures the OTLP exporter by default.Fixes #1481
Type of change
Please delete options that are not relevant.
Does This PR Require a Contrib Repo Change?
Checklist: