Skip to content

stats: need a way to lookup stats from strings in hot-path without taking a lock. #7003

@jmarantz

Description

@jmarantz

In general, we want to convert strings to StatName during initialization, xDS reload, etc, rather than doing string lookups in the hot-path.

However in some cases this may be unavoidable. For example, stat names can be controlled via HTTP request headers:

https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/router_filter#x-envoy-upstream-alt-stat-name

and

https://www.envoyproxy.io/docs/envoy/latest/configuration/http_filters/router_filter#config-http-filters-router-x-envoy-upstream-alt-stat-name

Some sort of stat lookup table can be integrated into Stats::ThreadLocalStore, but should be used sparingly as it will cost memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/statsenhancementFeature requests. Not bugs or questions.no stalebotDisables stalebot from closing an issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions