A middleware for TaskIQ with Elastic APM integration
Project description
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-middleware
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
middleware = ElasticApmMiddleware(server_url="http://apm-server:8200", service_name="your_service")
middleware.set_broker(broker)
Define your tasks and start your application as usual
Configuration
You can configure the middleware by passing parameters to ElasticApmMiddleware. The main parameters are:
server_url: The URL of your Elastic APM server.
service_name: The name of your service as registered in Elastic APM.
environment: (Optional) The deployment environment, e.g., 'production', 'development'.
config: (Optional) A dictionary with additional configuration options for the Elastic APM client.
Project details
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
Hashes for taskiq_elastic_apm-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb566e950784c5553728d76de916099e374945d5a01166dff56cfb72057f5b52 |
|
MD5 | 7e4aa3e5e900fc5f8b0035c3c0f55a6b |
|
BLAKE2b-256 | e2bdb9d6c78c5af35cf4e1c4dad3f898646f5d79fcbe1e13701bd999aae00e9c |