envoyproxy / envoyproxy/envoy

stats: do not send counters with 0 delta values

Open
#24,984 1 comment 0 reactions 0 assignees View on GitHub
enhancement mobile no stalebot
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 22h
Merged PRs (30d)
430

Description

*Title*: *Do not send counters with 0 values*

*Description*:
As it is now, when stats configuration includes `report_counters_as_deltas: true` (which is the the case in the case of Envoy Mobile https://github.com/envoyproxy/envoy/blob/d403816082b0fdea1d2e9d0753d64ea41ba2fbaa/mobile/library/common/config/config.cc#L158) we continue to put counters with delta values equal to 0 as part of stats upload payload as long as they've been increment at any point during the engine's lifecycle.

Result:
1. An engine launches
2. An engine emits stat X on launch.
3. Stat X (with delta/value > 0 is upload to the remote).
4. The bext stats upload triggers, the delta for stat X is equal to 0 but we continue to upload it.

Expected result:
In 4) we should not include stat X as part of the stats upload payload.

[optional *Relevant Links*:]
>Any extra documentation required to understand the issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.