Skip to content

Segment membership inspection metrics and logs #7413

@khvn26

Description

@khvn26

Scope

Implement the metrics and structured logs named in the RFC's Observability section:

  • Counters: flagsmith_segment_membership_atom_evaluations_total, flagsmith_segment_membership_bitmap_ops_total, flagsmith_segment_membership_backfill_identities_total.
  • Histograms: flagsmith_segment_membership_read_latency_seconds, flagsmith_segment_membership_write_latency_seconds, flagsmith_segment_membership_write_to_visible_seconds, flagsmith_segment_membership_backfill_duration_seconds.
  • Gauges: flagsmith_segment_membership_atoms_per_env, flagsmith_segment_membership_bitmap_bytes_per_env.
  • Structlog events: segment_membership.atom.created, segment_membership.atom.backfilled, segment_membership.query.served, segment_membership.backfill.failed.

Acceptance criteria

  • Metrics show up in /metrics after the index has handled at least one read / write / backfill.
  • Histogram bucket boundaries cover the SLO targets in flagsmith/pulumi#208.
  • Each metric carries a description following the api/README.md "Code guidelines: metrics" naming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssue related to the REST API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions