-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding opentelemetry-distro package and entrypoint #1482
Conversation
@@ -33,7 +33,7 @@ | |||
EXPORTER_OTLP = "otlp" | |||
EXPORTER_OTLP_SPAN = "otlp_span" | |||
EXPORTER_OTLP_METRIC = "otlp_metric" | |||
_DEFAULT_EXPORTER = EXPORTER_OTLP | |||
_DEFAULT_EXPORTER = "none" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not remove the line completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
Curious what is the execution order of things in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_distro
entrypoint, 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: