Skip to content

tag extraction: remove duplicate names for response code class metrics#2147

Merged
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
mrice32:tags_fix
Dec 2, 2017
Merged

tag extraction: remove duplicate names for response code class metrics#2147
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
mrice32:tags_fix

Conversation

@mrice32
Copy link
Copy Markdown
Member

@mrice32 mrice32 commented Dec 1, 2017

Description:
All stats that end with *rq_5xx and *rq_500 (for example) were being mapped to the same tag_extracted_name: *rq, which is expected to be a unique identifier for a particular stat in order for downstream systems to take advantage of tag extraction. Since two logical stats were being collapsed to the same name, this uniqueness was violated (see #2141 for details). This change updates the mapped name and tag value of the *rq_5xx case. The tag value becomes 5 rather than 5xx and the tag_extracted_name becomes *rq_xx (these choices are due to the current limitations of the regex extraction system).

Future work: add some complexity to the tag extraction regex system to allow the user to inject strings that are not present in the canonical string name into the tag_extracted_name. However, this fix should be good for differentiating these two sets of stats for the time being.

Fixes #2141

Risk Level: Low

Testing:
Updated existing tag extraction tests to ensure that updated regexes work as expected.

Signed-off-by: Matt Rice <mattrice@google.com>
@mrice32
Copy link
Copy Markdown
Member Author

mrice32 commented Dec 1, 2017

Signed-off-by: Matt Rice <mattrice@google.com>
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

This is great. Thanks @mrice32

@mattklein123 mattklein123 merged commit 5ff7b46 into envoyproxy:master Dec 2, 2017
@mrice32 mrice32 deleted the tags_fix branch March 1, 2018 16:04
Shikugawa pushed a commit to Shikugawa/envoy that referenced this pull request Mar 28, 2020
* update envoy with latest build fixes

Signed-off-by: Lizan Zhou <lizan@tetrate.io>

* update protobuf to match envoy

Signed-off-by: Lizan Zhou <lizan@tetrate.io>

* timeSystem -> timeSource

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Shikugawa pushed a commit to Shikugawa/envoy that referenced this pull request Mar 28, 2020
* update envoy to latest

Signed-off-by: Lizan Zhou <lizan@tetrate.io>

* update envoy with latest build fixes (envoyproxy#2147)

* fix build

Signed-off-by: Lizan Zhou <lizan@tetrate.io>

* fix build

Signed-off-by: Lizan Zhou <lizan@tetrate.io>

* fix formatting

* fix status match

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Signed-off-by: Snow Pettersen <snowp@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Signed-off-by: Snow Pettersen <snowp@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.

Stats broken out by response code and class lead to duplicated metrics in tagged stats formats

2 participants