diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-04-13 08:39:52 -0400 |
---|---|---|
committer | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-04-13 08:42:22 -0400 |
commit | e2874320fc027f7ab51ab3e115d5b1889b8fd747 (patch) | |
tree | cd755ef9b8522634c61aed9888239c9b67394157 /exporting/aws_kinesis | |
parent | 353780082c0ac8525e5b52aa8a29bbf5b70871e8 (diff) |
Revert changes since v1.21 in pereparation for hotfix release.
Diffstat (limited to 'exporting/aws_kinesis')
-rw-r--r-- | exporting/aws_kinesis/aws_kinesis.c | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/exporting/aws_kinesis/aws_kinesis.c b/exporting/aws_kinesis/aws_kinesis.c index 938569a9eb..4b0d5f74a4 100644 --- a/exporting/aws_kinesis/aws_kinesis.c +++ b/exporting/aws_kinesis/aws_kinesis.c @@ -75,23 +75,9 @@ void aws_kinesis_connector_worker(void *instance_p) uv_mutex_lock(&instance->mutex); uv_cond_wait(&instance->cond_var, &instance->mutex); - // reset the monitoring chart counters - stats->received_bytes = - stats->sent_bytes = - stats->sent_metrics = - stats->lost_metrics = - stats->receptions = - stats->transmission_successes = - stats->transmission_failures = - stats->data_lost_events = - stats->lost_bytes = - stats->reconnects = 0; - BUFFER *buffer = (BUFFER *)instance->buffer; size_t buffer_len = buffer_strlen(buffer); - stats->buffered_bytes = buffer_len; - size_t sent = 0; while (sent < buffer_len) { @@ -129,7 +115,7 @@ void aws_kinesis_connector_worker(void *instance_p) connector_specific_data, connector_specific_config->stream_name, partition_key, first_char, record_len); sent += record_len; - stats->transmission_successes++; + stats->chart_transmission_successes++; size_t sent_bytes = 0, lost_bytes = 0; @@ -141,34 +127,30 @@ void aws_kinesis_connector_worker(void *instance_p) "EXPORTING: failed to write data to database backend '%s'. Willing to write %zu bytes, wrote %zu bytes.", instance->config.destination, sent_bytes, sent_bytes - lost_bytes); - stats->transmission_failures++; - stats->data_lost_events++; - stats->lost_bytes += lost_bytes; + stats->chart_transmission_failures++; + stats->chart_data_lost_events++; + stats->chart_lost_bytes += lost_bytes; // estimate the number of lost metrics - stats->lost_metrics += (collected_number)( - stats->buffered_metrics * + stats->chart_lost_metrics += (collected_number)( + stats->chart_buffered_metrics * (buffer_len && (lost_bytes > buffer_len) ? (double)lost_bytes / buffer_len : 1)); break; } else { - stats->receptions++; + stats->chart_receptions++; } if (unlikely(netdata_exit)) break; } - stats->sent_bytes += sent; + stats->chart_sent_bytes += sent; if (likely(sent == buffer_len)) - stats->sent_metrics = stats->buffered_metrics; + stats->chart_sent_metrics = stats->chart_buffered_metrics; buffer_flush(buffer); - send_internal_metrics(instance); - - stats->buffered_metrics = 0; - uv_mutex_unlock(&instance->mutex); #ifdef UNIT_TESTING |