OpenTelemetry pymemcache Instrumentation¶
Usage¶
The OpenTelemetry pymemcache
integration traces pymemcache client operations
Usage¶
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.instrumentation.pymemcache import PymemcacheInstrumentor
trace.set_tracer_provider(TracerProvider())
PymemcacheInstrumentor().instrument()
from pymemcache.client.base import Client
client = Client(('localhost', 11211))
client.set('some_key', 'some_value')
API¶
-
class
opentelemetry.instrumentation.pymemcache.
PymemcacheInstrumentor
[source]¶ Bases:
opentelemetry.instrumentation.instrumentor.BaseInstrumentor
An instrumentor for pymemcache See
BaseInstrumentor