Skip to content

Commit

Permalink
Send Internal Diagnostic Metrics as Delta Counters (#80)
Browse files Browse the repository at this point in the history
* Send internal diagnostic metrics as delta counters

* Update version release to 1.7.9
  • Loading branch information
joannatk authored Feb 2, 2021
1 parent 15788dd commit 02dce1c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions open_source_license.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
open_source_license.txt

Wavefront by VMware SDK for Python 1.7.6 GA
Wavefront by VMware SDK for Python 1.7.9 GA

======================================================================

Expand Down Expand Up @@ -291,4 +291,4 @@ Source Files is valid for three years from the date you acquired or last used th
Software product. Alternatively, the Source Files may accompany the
VMware service.

[WAVEFRONTSDKPYTHON176GANT070819]
[WAVEFRONTSDKPYTHON179GANT070819]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setuptools.setup(
name='wavefront-sdk-python',
version='1.7.8',
version='1.7.9',
author='Wavefront by VMware',
author_email='chitimba@wavefront.com',
url='https://github.com/wavefrontHQ/wavefront-sdk-python',
Expand Down
42 changes: 21 additions & 21 deletions wavefront_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,69 +111,69 @@ def __init__(self,
self._sdk_metrics_registry.new_gauge(
'points.queue.remaining_capacity',
remaining_capacity_getter(self._metrics_buffer))
self._points_valid = self._sdk_metrics_registry.new_counter(
self._points_valid = self._sdk_metrics_registry.new_delta_counter(
'points.valid')
self._points_invalid = self._sdk_metrics_registry.new_counter(
self._points_invalid = self._sdk_metrics_registry.new_delta_counter(
'points.invalid')
self._points_dropped = self._sdk_metrics_registry.new_counter(
self._points_dropped = self._sdk_metrics_registry.new_delta_counter(
'points.dropped')
self._points_report_errors = self._sdk_metrics_registry.new_counter(
self._points_report_errors = self._sdk_metrics_registry.new_delta_counter(
'points.report.errors')

self._sdk_metrics_registry.new_gauge(
'histograms.queue.size', self._histograms_buffer.qsize)
self._sdk_metrics_registry.new_gauge(
'histograms.queue.remaining_capacity',
remaining_capacity_getter(self._histograms_buffer))
self._histograms_valid = self._sdk_metrics_registry.new_counter(
self._histograms_valid = self._sdk_metrics_registry.new_delta_counter(
'histograms.valid')
self._histograms_invalid = self._sdk_metrics_registry.new_counter(
self._histograms_invalid = self._sdk_metrics_registry.new_delta_counter(
'histograms.invalid')
self._histograms_dropped = self._sdk_metrics_registry.new_counter(
self._histograms_dropped = self._sdk_metrics_registry.new_delta_counter(
'histograms.dropped')
self._histograms_report_errors = (
self._sdk_metrics_registry.new_counter('histograms.report.errors'))
self._sdk_metrics_registry.new_delta_counter('histograms.report.errors'))

self._sdk_metrics_registry.new_gauge(
'spans.queue.size', self._tracing_spans_buffer.qsize)
self._sdk_metrics_registry.new_gauge(
'spans.queue.remaining_capacity',
remaining_capacity_getter(self._tracing_spans_buffer))
self._spans_valid = self._sdk_metrics_registry.new_counter(
self._spans_valid = self._sdk_metrics_registry.new_delta_counter(
'spans.valid')
self._spans_invalid = self._sdk_metrics_registry.new_counter(
self._spans_invalid = self._sdk_metrics_registry.new_delta_counter(
'spans.invalid')
self._spans_dropped = self._sdk_metrics_registry.new_counter(
self._spans_dropped = self._sdk_metrics_registry.new_delta_counter(
'spans.dropped')
self._spans_report_errors = self._sdk_metrics_registry.new_counter(
self._spans_report_errors = self._sdk_metrics_registry.new_delta_counter(
'spans.report.errors')

self._sdk_metrics_registry.new_gauge(
'span_logs.queue.size', self._spans_log_buffer.qsize)
self._sdk_metrics_registry.new_gauge(
'span_logs.queue.remaining_capacity',
remaining_capacity_getter(self._spans_log_buffer))
self._span_logs_valid = self._sdk_metrics_registry.new_counter(
self._span_logs_valid = self._sdk_metrics_registry.new_delta_counter(
'span_logs.valid')
self._span_logs_invalid = self._sdk_metrics_registry.new_counter(
self._span_logs_invalid = self._sdk_metrics_registry.new_delta_counter(
'span_logs.invalid')
self._span_logs_dropped = self._sdk_metrics_registry.new_counter(
self._span_logs_dropped = self._sdk_metrics_registry.new_delta_counter(
'span_logs.dropped')
self._span_logs_report_errors = self._sdk_metrics_registry.new_counter(
self._span_logs_report_errors = self._sdk_metrics_registry.new_delta_counter(
'span_logs.report.errors')

self._sdk_metrics_registry.new_gauge(
'events.queue.size', self._events_buffer.qsize)
self._sdk_metrics_registry.new_gauge(
'events.queue.remaining_capacity',
remaining_capacity_getter(self._events_buffer))
self._events_valid = self._sdk_metrics_registry.new_counter(
self._events_valid = self._sdk_metrics_registry.new_delta_counter(
'events.valid')
self._events_invalid = self._sdk_metrics_registry.new_counter(
self._events_invalid = self._sdk_metrics_registry.new_delta_counter(
'events.invalid')
self._events_dropped = self._sdk_metrics_registry.new_counter(
self._events_dropped = self._sdk_metrics_registry.new_delta_counter(
'events.dropped')
self._events_report_errors = self._sdk_metrics_registry.new_counter(
self._events_report_errors = self._sdk_metrics_registry.new_delta_counter(
'events.report.errors')

def _report(self, points, data_format, entity_prefix, report_errors):
Expand Down Expand Up @@ -202,7 +202,7 @@ def _report(self, points, data_format, entity_prefix, report_errors):
headers=self._headers,
data=compressed_data)

self._sdk_metrics_registry.new_counter(
self._sdk_metrics_registry.new_delta_counter(
'{}.report.{}'.format(entity_prefix,
response.status_code)).inc()
response.raise_for_status()
Expand Down

0 comments on commit 02dce1c

Please sign in to comment.