Skip to main content

Thumbor metrics extension that forwards metrics to New Relic

Project description

Thumbor NewRelic Metrics Plugin

Send Thumbor runtime metrics to your NewRelic account.

Status

Installation

# master branch
pip install -e git+https://github.com/jcord04/thumbor-newrelic.git@master#egg=tc_newrelic

# latest stable
pip install tc_newrelic

Configuration

# Use New Relic metrics instead of the default
METRICS = 'tc_newrelic.metrics.newrelic_metrics'

# Required: Your New Relic License Key
NEWRELIC_LICENSE_KEY = 'your_license_key_here'

# Optional configurations with defaults
NEWRELIC_METRIC_API_URL = 'https://metric-api.newrelic.com/metric/v1'  # Change for EU or other regions
NEWRELIC_APP_NAME = 'Thumbor'  # The application name in New Relic
NEWRELIC_SEND_INTERVAL_SECONDS = 15  # How often to send metrics (in seconds)

Metrics

This plugin collects the same metrics as the Prometheus plugin for Thumbor and forwards them to New Relic. The metrics are sent with the prefix custom.thumbor. to distinguish them in New Relic.

The following metrics are collected:

  • response.status - HTTP status codes of responses
  • response.format - Format of responses
  • response.bytes - Size of responses in bytes
  • response.time - Response time
  • original_image.status - Status of original image fetches
  • original_image.fetch - Time to fetch original images

Viewing Metrics in New Relic

You can view the metrics in New Relic using NRQL queries. For example:

SELECT count(*) FROM Metric WHERE metricName LIKE 'custom.thumbor.%' FACET metricName SINCE 1 hour ago TIMESERIES

Or create a dashboard with specific metrics:

SELECT sum(value) FROM Metric WHERE metricName = 'custom.thumbor.response.status' AND statuscode = '200' SINCE 1 day ago TIMESERIES

Multiple Processes Support

If running Thumbor with multiple processes, you should be able to use this plugin without any additional configuration. The metrics are aggregated in-memory and sent to New Relic periodically.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

tc_newrelic-1.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tc_newrelic-1.0.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file tc_newrelic-1.0.1.tar.gz.

File metadata

  • Download URL: tc_newrelic-1.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tc_newrelic-1.0.1.tar.gz
Algorithm Hash digest
SHA256 28e6357dec4297b99c49c2e57bc5bf0c061b6ecd62c45ad18a76d276077e4e45
MD5 0cd8a43d272bf18ef6506e0c13d68fef
BLAKE2b-256 5c3afcbad09b7607e101a0352eb9efa5f8995c3a55968079861f583f22a61a30

See more details on using hashes here.

Provenance

The following attestation bundles were made for tc_newrelic-1.0.1.tar.gz:

Publisher: python-publish.yml on jcord04/thumbor-newrelic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tc_newrelic-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: tc_newrelic-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tc_newrelic-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89031f2620dd61a71232e1068a801c8e1d2f2db1b1205b406eba34afea50e56f
MD5 cfc7a003fa337ade60b07862e91ffc6c
BLAKE2b-256 7d3579cce18dfcba68022fb54cf1111f2abd61c374754fe7a8ca0d1fc4ee6736

See more details on using hashes here.

Provenance

The following attestation bundles were made for tc_newrelic-1.0.1-py3-none-any.whl:

Publisher: python-publish.yml on jcord04/thumbor-newrelic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page