Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions python/natsrpy/instrumentation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ async def main() -> None:

from .js_consumer import JSConsumerInstrumentation
from .js_publish import JSPublishInstrumentation
from .kv import KVInstrumentation
from .nats_core import NatsCoreInstrumentator
from .object_store import ObjectStoreInstrumentation

try:
import opentelemetry # noqa: F401
Expand Down Expand Up @@ -105,8 +107,18 @@ def _instrument(self, **kwargs: Any) -> None:
capture_body=capture_body,
capture_headers=capture_headers,
).instrument()
KVInstrumentation(
tracer,
capture_body=capture_body,
).instrument()
ObjectStoreInstrumentation(
tracer,
capture_body=capture_body,
).instrument()

def _uninstrument(self, **kwargs: Any) -> None:
NatsCoreInstrumentator.uninstrument()
JSConsumerInstrumentation.uninstrument()
JSPublishInstrumentation.uninstrument()
KVInstrumentation.uninstrument()
ObjectStoreInstrumentation.uninstrument()
Loading
Loading