newrelic-airflow-plugin
newrelic-airflow-plugin copied to clipboard
Timing metrics only report the microseconds part of the measurement
When NewRelicStatsLogger.timing is called with a timedelta as an argument it sends timedelta.microseconds
to New Relic.
This attribute doesn't convert the full value to microseconds, it only contains the microseconds part of the difference:
>>> timedelta(minutes=10, seconds=10, microseconds=500).microseconds
500
.timing
should probably call timedelta.total_seconds()
instead:
>>> timedelta(minutes=10, seconds=10, microseconds=500).total_seconds()
610.0005