Trace Postgres and Redis queries with the contrib instrumentations
CI / Build and push docker image (push) Successful in 2m42s
CI / Build and push docker image (push) Successful in 2m42s
Builds the TracerProvider in tavolo.telemetry (kaya-otel's is private) and injects it into kaya-otel, then instruments asyncpg and redis through opentelemetry-instrumentation-asyncpg/redis. Redis command values are redacted and asyncpg spans carry the parameterized SQL only.
This commit is contained in:
@@ -78,6 +78,15 @@ class OTelMixinFromSettingsTests(unittest.TestCase):
|
||||
assert isinstance(mixin, _StubOTelMixin)
|
||||
self.assertIs(provider, mixin.kwargs["meter_provider"])
|
||||
|
||||
def test_tracer_provider_is_passed_through(self):
|
||||
with _stub_kaya_otel():
|
||||
provider = object()
|
||||
mixin = otel_mixin_from_settings(
|
||||
_settings({"OTEL_ENABLED": "1"}), tracer_provider=provider
|
||||
)
|
||||
assert isinstance(mixin, _StubOTelMixin)
|
||||
self.assertIs(provider, mixin.kwargs["tracer_provider"])
|
||||
|
||||
def test_excluded_paths_are_passed_through(self):
|
||||
with _stub_kaya_otel():
|
||||
mixin = otel_mixin_from_settings(_settings({
|
||||
|
||||
Reference in New Issue
Block a user