Skip to content

perf(observability): roll up log histogram counts by scoped severity #276

Description

@vishr

PR #272 review follow-up for logs.go: #272 (comment)

Cache per-minute counts by namespace, service, and severity for requests without free-text search. Merge exact partial-minute boundaries and uncached/late batches. Free-text searches match redacted bodies and must retain their raw predicate.

Validation: entries, bucket counts, and matched totals remain consistent for unfiltered/severity/service/namespace/search cases, nonaligned bounds, mixed severity spelling, late data, restart and publication changes. Measure scan rows/CPU as retained data grows.

Implementation is authorized in PR #272; this issue tracks the fix and its validation.

Activity

  1. vishr commented on Oct 1, 2026

    @vishr
    MemberAuthor

    Implemented scoped severity minute counts plus exact boundary-time counts and uncached active files. Duplicate timestamps retain their multiplicity. Free-text searches continue counting matches on redacted bodies. Tests compare raw/production entries and histogram data across namespaces, services, severities, searches, clipped windows, cold/warm caches, and late publication. Broad/narrow log medians improve 60.60 to 18.13ms and 38.56 to 15.25ms on identical files.

    Implemented in ea13675; tracked in #276. Measurement report and reproduction. just check, the full Go race suite, and native Linux ARM64 full Go tests pass. Issue closure is linked to merge of #272.

  2. vishr commented on Oct 1, 2026

    @vishr
    MemberAuthor

    Final parity hardening is in cd916d5: caches retain the original severity text, so case-insensitive filters and uppercase histogram groups reproduce raw SQL even for Unicode labels. Tests cover i/İ, duplicates, searches, scopes, and exact boundaries; query/observability race tests pass. The repeated identical-file benchmark gives broad endpoint/trace/log medians 32.38/20.04/18.21ms, with unchanged qualitative limits. The report and JSON retain both trials.

    64e3ce9 also clarifies that skip-to-latest applies to service/edge rollups; completed-batch caches still rebuild retained history. Both commits passed the full normal pre-push gate.

    cd916d5c
    64e3ce9d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions