This commit makes the following changes:
- Introduces a new `load_instrumentor(EntryPoint) -> None:` with a
default implementation method to the `BaseDistro` class.
- The default implementation loads the insrumentor from the provided
entry point and calls applies it without any arguments. (same as before)
- sitecustomize now calls Distro's `load_instrumentor` method to load
and activate an instrumentor instead of doing it directly.
- Added a new `DefaultDistro` implementation which is used if not distro
is found by entry points.
All instrumentations packages have almost exactly same setup.py files.
This commit adds a python script that generates it from a source
template. This dramatically reduces the time and effort required to
update all instrumentation setup.py files, and also reduces chances of
making manual mistakes.
* redis: fix default port KeyError, wrong attr name
* fix docker tests and another ip/port issue in asyncpg
Co-authored-by: Alex Boten <aboten@lightstep.com>
There are a few cases where one needs to dig into `grpc.ServicerContext`
objects, and these fields were missing from our wrapper, which can cause
issues with implmementation.
The datadog exporter sometimes attempts to add a "None" value, if the
datadog origin header doesn't exist.
This does not cause runtime errors in the most recent opentelemetry
release (tracestate protects against an invalid value), but does cause warnings:
WARNING opentelemetry.trace.span:span.py:230 Invalid key/value pair (dd_origin, None) found.