OpenTelemetry instrumentation for python RQ library
Project description
Opentelemetry Instrumentation for rq
This library provides an OpenTelemetry Instrumentation library for Python RQ (Redis Queue). It enables distributed tracing and monitoring of tasks produced and processed by RQ workers, making it easier to gain insights into your application's performance and behavior.
Supported Features
Automatic tracing when
- Task producing, via
rq.queue.Queue._enqueueorrq.queue.Queue.schedule_job - Task execution, via
rq.worker.Worker.perform_job,rq.job.Job.perform - Span link between jobs which have dependencies (i.e, produce with
queue.enqueue(f, depends_on=xxx)) - Callback function execution after a job succeeds, fails, or stops, via
rq.job.Job.execute_*_callback
Installation
Install this package with pip:
pip install opentemeletry_instrumentation_rq
Usage
Quick Start
In your RQ producer or worker code, initialize the OpenTelemetry RQ instrumentation:
from opentelemetry_instrumentation_rq import RQInstrumentor
RQInstrumentator().instrument()
Additional Scenarios
For more use cases, refer to the tests in tests/e2e_test. You can launch an RQ worker using tests/e2e_test/simulator/worker.py and execute producer commands from tests/e2e_test/test_simulation.py.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opentelemetry_instrumentation_rq-0.1.4.tar.gz.
File metadata
- Download URL: opentelemetry_instrumentation_rq-0.1.4.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14076f035cee71b7eacba451cff774c09de1ce81f206aa4c2b1d9cb65c4f7cfb
|
|
| MD5 |
7d02e7f40eceb3d3d1941b3994a43e68
|
|
| BLAKE2b-256 |
05f295ccfe37fe8372c825b09259aff51b564552b12df8003c619011f59e72e4
|
Provenance
The following attestation bundles were made for opentelemetry_instrumentation_rq-0.1.4.tar.gz:
Publisher:
python-publish.yml on K-T-Ng/opentelemetry-instrumentation-rq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opentelemetry_instrumentation_rq-0.1.4.tar.gz -
Subject digest:
14076f035cee71b7eacba451cff774c09de1ce81f206aa4c2b1d9cb65c4f7cfb - Sigstore transparency entry: 1051163517
- Sigstore integration time:
-
Permalink:
K-T-Ng/opentelemetry-instrumentation-rq@a21c3b735273b3b44ba1ba7bda8bcfab825ce59f -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/K-T-Ng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a21c3b735273b3b44ba1ba7bda8bcfab825ce59f -
Trigger Event:
push
-
Statement type:
File details
Details for the file opentelemetry_instrumentation_rq-0.1.4-py3-none-any.whl.
File metadata
- Download URL: opentelemetry_instrumentation_rq-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fd68a6d255ae29f6f40a3a22bde0fc101ae99bbc20c88f359435dee35d9ae73
|
|
| MD5 |
c7419b693dc1fd99b621e4175780c408
|
|
| BLAKE2b-256 |
bc6d540ea9b6a83cf1c37c5fda0699dab0bf4bcb51b42753c2cbbfdb35226911
|
Provenance
The following attestation bundles were made for opentelemetry_instrumentation_rq-0.1.4-py3-none-any.whl:
Publisher:
python-publish.yml on K-T-Ng/opentelemetry-instrumentation-rq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opentelemetry_instrumentation_rq-0.1.4-py3-none-any.whl -
Subject digest:
7fd68a6d255ae29f6f40a3a22bde0fc101ae99bbc20c88f359435dee35d9ae73 - Sigstore transparency entry: 1051163539
- Sigstore integration time:
-
Permalink:
K-T-Ng/opentelemetry-instrumentation-rq@a21c3b735273b3b44ba1ba7bda8bcfab825ce59f -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/K-T-Ng
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a21c3b735273b3b44ba1ba7bda8bcfab825ce59f -
Trigger Event:
push
-
Statement type: