Skip to content

Normalize per-instance event metrics policy #2039

Description

@josecelano

Goal

Make tracker_usage_statistics control metrics processing for an individual public HTTP or UDP listener, without suppressing objective events or UDP ban enforcement.

Concrete UDP Failure Example

With two UDP listeners, one metrics-disabled and one metrics-enabled, one announce to each currently yields REST API udp4_announces_handled = 2, not 1.

The REST API reads this counter from the UDP server metrics repository. One application-wide UDP server event bus feeds that repository with no per-listener metrics policy. The old producer-side event suppression model is no longer valid because UDP server facts are also consumed by an independent banning listener.

Design

Always emit objective HTTP/UDP events with canonical listener identity. Metrics listeners filter disabled listeners before mutating shared aggregate repositories. Banning remains independent and receives relevant cookie-error events from every listener.

Prerequisites

Scope

  • Normalize HTTP core, UDP core, and UDP server event publication.
  • Filter metrics in listeners, not producers.
  • Preserve aggregate REST API and UDP operational metrics.
  • Add focused, integration, and progressive manual verification, including duplicate port-zero blocks.

Acceptance criteria

  • Metrics-disabled HTTP/UDP listeners emit facts but do not update aggregate metrics.
  • Metrics-disabled UDP listeners still contribute relevant facts to shared banning.
  • Filtering uses canonical identity and works for repeated 0.0.0.0:0 blocks.
  • REST aggregate and UDP operational metrics remain available.
  • Relevant tests, linter all, and manual evidence pass.

Related to #2035, #2036, #2041, and #1419.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIncorrect Behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions