TaskIQ Elastic APM Middleware
TaskIQ Elastic APM Middleware is a Python library providing easy integration of Elastic APM monitoring into TaskIQ task processing. This middleware enables efficient tracking and analysis of task performance and errors, leveraging the capabilities of Elastic APM.
Features
- Easy integration with TaskIQ workers.
- Automatic performance and error tracking for tasks.
- Customizable to fit various Elastic APM configurations.
Installation
You can install the TaskIQ Elastic APM Middleware directly from PyPI:
pip install taskiq-elastic-apm
Usage To use the middleware in your TaskIQ project, simply import and add it to your TaskIQ application:
python Copy code from taskiq import Taskiq from taskiq_elastic_apm_middleware import ElasticApmMiddleware
Create your Taskiq instance
broker = AioPikaBroker(
url=settings.CELERY_BROKER_URL,
queue_name=settings.CELERY_DEFAULT_QUEUE,
exchange_name=settings.CELERY_DEFAULT_QUEUE,
).with_middlewares(
ElasticApmMiddleware(
client=apm,
)
)
Define your tasks and start your application as usual
Configuration
You can configure the middleware by passing parameters to ElasticApmMiddleware.
The main parameters are:
client: elasticapm.Client - The Elastic APM client instance to use. If not provided, a new client will be created using the following parameters:
from elasticapm.contrib.starlette import make_apm_client
apm_settings = {
"ENABLED": settings.APM_ENABLE,
"ENVIRONMENT": settings.ENVIRONMENT,
"SERVER_URL": settings.APM_SERVER_URL,
"SERVICE_NAME": settings.SERVICE_NAME,
"SECRET_TOKEN": settings.APM_SECRET_TOKEN,
"CAPTURE_BODY": settings.APM_CAPTURE_BODY,
"CAPTURE_HEADERS": settings.APM_CAPTURE_HEADERS,
"COLLECT_LOCAL_VARIABLES": settings.APM_COLLECT_LOCAL_VARIABLES,
"AUTO_LOG_STACKS": settings.APM_AUTO_LOG_STACKS,
}
apm = make_apm_client(apm_settings)
Metadata
Release files for taskiq-elastic-apm 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| taskiq_elastic_apm-0.0.4.tar.gz | 3.7 kB | Without provenance | Details for taskiq_elastic_apm-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| taskiq_elastic_apm-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for taskiq_elastic_apm-0.0.4-py3-none-any.whl |
Total release size: 7.5 kB
Release files / taskiq_elastic_apm-0.0.4.tar.gz
| Download URL | taskiq_elastic_apm-0.0.4.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37d390c8247ff29e33be1759ceb7428e93095ca011d0fe1ce7956f6b8c6ca3d7
|
|
BLAKE2b-256 checksum How to use checksums |
e3e89f1055b9874d7cd01273571027b371c7f99abec6b43c5485311797ea6f38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / taskiq_elastic_apm-0.0.4-py3-none-any.whl
| Download URL | taskiq_elastic_apm-0.0.4-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bacae8f2cbf1088a74f847d2a8271f839f7a059a4efbb688d0675632219a56e7
|
|
BLAKE2b-256 checksum How to use checksums |
a088515eb8186a8e6f03151fa2edc05b1cab9b0fbfa1ec605c2af15757ab79c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Security for taskiq-elastic-apm 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.