Repository navigation
Conversation
HttpBatchService created component_sent_bytes_total with emit!(EndpointBytesSent) on the first successful request and dropped the handle, so the series did not exist before the first event and was removed after expire_metrics_secs while the sink was idle. The "sink no data" alert reads this metric. HttpBatchService now creates the counter once when it is built, holds the handle and increments it per successful request. The endpoint and protocol labels are dropped; only the component_id/kind/type span tags remain. This covers every sink built on HttpBatchService (http, splunk_hec, elasticsearch, honeycomb, clickhouse, stackdriver, appsignal, datadog events, ...). Test changes: - SINK_TESTS: component_sent_bytes_total is checked as an untagged counter and BytesSent is no longer an expected event. - metrics::init_test() returns early if the recorder exists, because VectorRecorder::new_test() clears the registry on every call. - Tests that build the sink before the compliance wrapper call init_test() first so the counter is created against a live recorder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HttpBatchService created component_sent_bytes_total with emit!(EndpointBytesSent) on the first successful request and dropped the handle, so the series did not exist before the first event and was removed after expire_metrics_secs while the sink was idle. The "sink no data" alert reads this metric.
HttpBatchService now creates the counter once when it is built, holds the handle and increments it per successful request. The endpoint and protocol labels are dropped; only the component_id/kind/type span tags remain. This covers every sink built on HttpBatchService (http, splunk_hec, elasticsearch, honeycomb, clickhouse, stackdriver, appsignal, datadog events, ...).
Test changes: