New Relic Plugin for Apache Airflow
Project description
New Relic Airflow Metric Exporter
A plugin for Apache Airflow to send metrics to New Relic.
Requirements
Only supports Airflow versions >= 2.0.
Using the plugin
To start, the newrelic-airflow-plugin package must be installed. To install via pip:
$ pip install newrelic-airflow-plugin
Configuration
Set the NEW_RELIC_INSERT_KEY environment variable to a valid New Relic insert key
The NEW_RELIC_SERVICE_NAME environment variable can be set to customize the service.name attribute on all generated metrics. The default value is Airflow.
NEW_RELIC_HOST environment variable can be used to set datacenter host. For example, to send metrics to EU data center set this variable to metric-api.eu.newrelic.com By default metrics will be send to US data center.
Airflow Versions >= 2.0
Disable Airflow’s lazy plugin loading. This is required for the plugin to properly patch Airflow’s Stats engine.
This can be done via environment variable:
AIRFLOW__CORE__LAZY_LOAD_PLUGINS=False
Or can be set in your config file (airflow.cfg):
[core]
lazy_load_plugins = False
Airflow Versions >= 1.10,<2.0
✨ That’s it! ✨
Airflow Versions < 1.10
The newrelic_plugin.py file must be copied into the configured plugins_folder directory. This defaults to {AIRFLOW_HOME}/plugins.
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 newrelic-airflow-plugin-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01147642d4571c756041bcbb5ba653905b81475df69757307ecd3206b0b5981c |
|
MD5 | ced3f5fb3faa6b0e93f14e54cd6cc91f |
|
BLAKE2b-256 | 16337ff362338da5499922a3c8fee202f8c2dc53f3e1b85ae269d1f510a08a03 |
Hashes for newrelic_airflow_plugin-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24f1ba71a9203e461e79117b95ea12f97e70da2ece3e0a3bf88c1d974dc147d8 |
|
MD5 | 47fa3db78403d0747b4534cd4cab5cfa |
|
BLAKE2b-256 | e730ef71bfd809748f28e218d7969dab1f289d17ae8cc4cefb691b8b77698218 |