Skip to content

Dynamic Modules: Support Metrics with Tags #41002

Closed

Description

@wtzhang23

Title: Dynamic Modules: Support Metrics with Tags

Description:
Currently, dynamic modules support metrics without labels. However, many real-world use cases may want to emit metrics with labels, some of which whose values may not be known in advance. A consequence of this is that the full metric name including the tags may need to be created during HTTP processing rather than HTTP filter factory construction.

This issue tracks the work to support these metrics.

Relevant Links:

  • The Istio stats filter as an example of how stats are used in custom filters

Activity

  1. added
    enhancement
    triage
    on Sep 5, 2025
  2. wtzhang23 commented on Sep 5, 2025

    @wtzhang23
    ContributorAuthor

    One potential way of supporting metrics with labels: #41003. Idea is to make the abi similar to how you would define metrics in a service, e.g. golang: https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#NewCounterVec. One limitation of this approach is that label values aren't cached across different filter instances. I initially thought that we could support caching label values through tagged unions, but thought that would complicate the ABI significantly.

  3. added and removed
    triage
    on Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/dynamic_modulesarea/statsenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions