Skip to content

Tag-awareness in the stats API #9194

@kyessenov

Description

@kyessenov

We would like to expose a stats API to extensions through Wasm that is compatible with a general purpose OpenCensus/OpenTelemetry interfaces. Generally, these provide an ability to separate tag keys from tag values (e.g. https://opencensus.io/tag/). Envoy currently compresses all tags into a single long string, and expects custom tag extractors for post-processing. This causes two issues:

  1. Regex overhead. Separating key=value pairs requires extra static bootstrap config (it is neither xDS compatible, nor modifiable by extensions), and extra parsing overhead since these are not simple prefix matches.
  2. Symbol tables cannot distinguish static tag keys from the dynamic/per-request tag values. OpenCensus, for example, maintains a global symbol table for keys but not values, since registering new values at request time would cause lock contention. Envoy, however, would either inline all stats symbols or none of them, there is no way to distinguish between keys and values.

This is a feature request to extend the internal stats API to allow registering stat tag keys so that they can be automatically extracted on export without regex parsing, and symbol table gains awareness of the keys vs values.

cc @jmarantz @mandarjog @jplevyak

Metadata

Metadata

Assignees

Labels

area/statsenhancementFeature requests. Not bugs or questions.stalestalebot believes this issue/PR has not been touched recently

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions