You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid metric format emitted for stats where to-zone/from-zone is empty #15541
Title: Invalid metric format emitted for stats where to-zone/from-zone is empty
Description:
What issue is being seen? Describe what should be happening instead of
the bug, for example: Envoy should not crash, the expected value isn't
returned, etc.
Stats are being emitted from Envoy with consecutive .. between namespaces due to empty to-zone,
for example:
Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.
Do not specify an AZ for an upstream cluster.
Inspect the AZ-AZ stats via curl on admin.
Admin and Stats Output:
Include the admin output for the following endpoints: /stats,
/clusters, /routes, /server_info. For more information, refer to the admin endpoint documentation.
@jessicayuen if you've started on this please lmk if you have any questions. I had forgotten the details on why the loop in SymbolTableImpl::addTokensToEncoding does not just skip empty tokens.
Thanks @jmarantz I plan to make the fix over the week. I don't believe there is a unit test for this issue since we internally caught this via a metrics audit of the /stats endpoint. I'll add a test though. Will reach out to you if I have any questions!
Activity
mattklein123 commentedon Mar 17, 2021
cc @jmarantz I think Jess is going to fix this but may reach out to you for tips.
jmarantz commentedon Mar 18, 2021
@jessicayuen if you've started on this please lmk if you have any questions. I had forgotten the details on why the loop in SymbolTableImpl::addTokensToEncoding does not just skip empty tokens.
jmarantz commentedon Mar 18, 2021
Making the above change results in just two unit tests failing that just need regolds I think, and the fuzz test.
Do you have a unit test for this specific issue?
jessicayuen commentedon Mar 18, 2021
Thanks @jmarantz I plan to make the fix over the week. I don't believe there is a unit test for this issue since we internally caught this via a metrics audit of the /stats endpoint. I'll add a test though. Will reach out to you if I have any questions!
jmarantz commentedon Mar 18, 2021
For a unit test I was thinking something in upstream_impl_test that poked in an empty zone and verified that the right stat-names get created.
The fix should be easy.
jessicayuen commentedon Mar 19, 2021
perfect, looking for something small to help me get acquainted with the codebase :)
jmarantz commentedon Mar 19, 2021
Great. Happy to help. Quick suggestion; if you haven't seen it, you might wan to take a quick look at https://github.com/envoyproxy/envoy/blob/main/source/docs/stats.md#stat-naming-infrastructure-and-memory-consumption to get an idea of the StatName structure.
stats: skip symbolizing empty tokens
jmarantz commentedon May 26, 2021
envoy/source/common/http/codes.cc
Line 107 in 491b116