OpenTelemetry Remoulade Instrumentation¶
This library allows tracing requests made by the Remoulade library.
Installation¶
pip install opentelemetry-instrumentation-remoulade
References¶
Usage¶
Start broker backend
docker run -p 5672:5672 rabbitmq
Run instrumented actor
from remoulade.brokers.rabbitmq import RabbitmqBroker
import remoulade
RemouladeInstrumentor().instrument()
broker = RabbitmqBroker()
remoulade.set_broker(broker)
@remoulade.actor
def multiply(x, y):
return x * y
broker.declare_actor(count_words)
multiply.send(43, 51)
- class opentelemetry.instrumentation.remoulade.RemouladeInstrumentor(*args, **kwargs)[source]¶
Bases:
opentelemetry.instrumentation.instrumentor.BaseInstrumentor
- instrumentation_dependencies()[source]¶
Return a list of python packages with versions that the will be instrumented.
The format should be the same as used in requirements.txt or pyproject.toml.
For example, if an instrumentation instruments requests 1.x, this method should look like:
- def instrumentation_dependencies(self) -> Collection[str]:
return [‘requests ~= 1.0’]
This will ensure that the instrumentation will only be used when the specified library is present in the environment.
- Return type