Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics service sink: add config option to report counters as deltas #10889

Merged
merged 9 commits into from
Apr 28, 2020
Merged

metrics service sink: add config option to report counters as deltas #10889

merged 9 commits into from
Apr 28, 2020

Conversation

junr03
Copy link
Member

@junr03 junr03 commented Apr 21, 2020

Description: this PR adds the ability to configure the metrics service stats sink to report counters as deltas between flushing intervals. This is the expected representation for some stats aggregations backends. Similar behavior is seen, for instance, in the statsd sink.
Risk Level: low, previous behavior is left unchanged, and is the default.
Testing: updated unit test.
Docs Changes: left comments in the field definition
Release Notes: updated version history.

Signed-off-by: Jose Nino jnino@lyft.com

Jose Nino added 3 commits April 21, 2020 15:08
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
@junr03 junr03 requested a review from jmarantz as a code owner April 21, 2020 22:59
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #10889 was opened by junr03.

see: more, trace.

@junr03
Copy link
Member Author

junr03 commented Apr 21, 2020

Additional context: Envoy Mobile has been using the metrics service sink to gather data since mid-november. However, in the low volume environments we were testing we did not notice that counters were being amplified.

In the last couple of weeks we started testing in production, and I noticed that our values for counters were orders of magnitude higher than expected (and cross-validated with client events). I noticed the problem is that the metrics service sink reports the current value of counters on a flush, rather than the delta. Given the timestamp is reported with the metric we could solve for this on the receiving service. However, given that Envoy already has the needed information, I found it more efficient to have the sink report the delta.

Jose Nino added 2 commits April 23, 2020 14:01
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
@junr03
Copy link
Member Author

junr03 commented Apr 27, 2020

@htuch @ramaraochavali I have created an issue to track future work #10968 and merged master. Do you mind doing another pass?

Jose Nino added 2 commits April 27, 2020 14:24
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
@jmarantz jmarantz assigned htuch and unassigned jmarantz Apr 28, 2020
@jmarantz
Copy link
Contributor

unassigning myself as I see @htuch is on it.

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo two small comment comments.
/wait

Signed-off-by: Jose Nino <jnino@lyft.com>
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@junr03 junr03 merged commit 048f423 into envoyproxy:master Apr 28, 2020
junr03 added a commit to envoyproxy/envoy-mobile that referenced this pull request Apr 28, 2020
Description: updates the envoy ref. Brings in the ability to report counters as deltas in the metrics service stats sink envoyproxy/envoy#10889.

Signed-off-by: Jose Nino <jnino@lyft.com>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Description: updates the envoy ref. Brings in the ability to report counters as deltas in the metrics service stats sink #10889.

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Description: updates the envoy ref. Brings in the ability to report counters as deltas in the metrics service stats sink #10889.

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants