Replies: 2 comments 8 replies
-
Thanks for the detailed explanation Diego. I think problem 2. should be restated as
as this was the original problem that came up. IMO the title for problem 2. as you've stated is one of the viable solutions to the problem but not the problem itself. |
Beta Was this translation helpful? Give feedback.
-
I think we should approach these problems in a different order. Before anything else, we should try to figure out the answer to problem 3.
Once we know the answer to this, we'll know whether de-coupling instrumentation and distro packages makes sense (most likely still does) and how the decoupling should exactly work. Can distro take dependency on SDK? Can may be the SDK include the base distro class? A lot of these questions will be answered if we solve 3. first. Once we have these answers, it'll be easy to solve 1. (decoupling) and possibly we might not even need a solution for 3 (code re-use between distros). 4 (celery special case) IMO is an instrumentation related issue. Distro design can definitely affect it but I think it can be retrofitted for almost any design so I'd keep it for the last. |
Beta Was this translation helpful? Give feedback.
-
As discussed in the last SIG, here is a list of the problems that we have right now that are directly or indirectly related to the distro/instrumentation/SDK-configuration topic. The problems listed below are in no particular order, nevertheless, some problem solutions may be independent from other solutions, some other solutions for certain problems may require that other problems be solved first:
The intention of this discussion is only to make a complete list of the problems of this kind. Please add here in the comments any other problem that is missing from this list that is also related directly or indirectly to the distro/instrumentation/SDK-configuration topic, I'll update this list with the mentioned problems. Please add any comments related to the specific possible solutions for these problems in their respective PR, issue or discussion.
Distros are coupled with instrumentation
Right now, distros are coupled with instrumentation in several ways:
opentelemetry-distro
entry points in our auto instrumentation process.I consider this to be a problem because distros are a way of making configuration happen before auto instrumentation is run, but they are only one of many ways that this can be achieved. Users may want to perform their configuration with configuration files, or environment variables or any other mechanism they prefer.
These are the PRs that attempt to solve this problem:
We need to define a mechanism to select a distro among many
While there will be many distros, we want to select only one to be applied. Right now, the first distro loaded from the
opentelemetry_distro
entry point will be selected. This is a problem because it is not deterministic which distro will be the first one in this case, so if the user has more than one distro installed, any one can end up being selected.These are the PRs that attempt to solve this problem
We need to define a mechanism to configure the SDK
The spec has a document for the configuration of the SDK. Basically, we need to implement a feature for this to be spec compliant. What we have right now is the code that was added by #1937 which moved into the SDK several functions that can be used to configure the SDK. These functions were added in a private
_configuration
module to move forward with this PR but we have a pending task to find a final solution because we are going against Python standard practice by importing symbols from this private module.Right now there are no open PRs that attempt to solve this problem. There is an important disclaimer, though: we may decide that distros are to be used to configure the SDK. I am not considering #1983 as a solution to this problem even when it introduces entry points that could be used to configure the SDK because I consider that PR to be focused on decoupling distros from instrumentation instead.
We have Celery-specific code in our instrumentation package
Right now we have Celery-specific code in our auto instrumentation process. This should not be, because the auto instrumentation process should be completely decoupled from any third-party library.
Right now there are no open PRs that attempt to solve this problem. Again, there is a similar disclaimer: #1983 introduces general purpose entry points that can be used to load a callable that handles this Celery-specific code and solves this problem. For the same reason as above, though, I am not considering #1983 as a solution for this problem.
Beta Was this translation helpful? Give feedback.
All reactions