Skip to content

Add UsageMultiSetCounter (up for discussion) #11934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

joe4dev
Copy link
Member

@joe4dev joe4dev commented Nov 26, 2024

Extracted from #11883

Motivation

Our current UsageSetCounter can record events of different categories (i.e., set), but cannot record multi-dimensional data (e.g., source, target). This PR contains a possible implementation for a two-dimensional multi-set counter.

We decided not to move forward with this approach until the data requirements are clearer (e.g., allow for generic analysis/materialization rather than feature-specific solutions that don't scale). Therefore, this PR is parked for now and up for discussion.

Discussion

The flat record structure (pipes:invocation:aws:sqs) is not ideal and would be cumbersome to analyze.
Something like this might be more suitable, but still not ideal if the namespace is feature-specific:

{"outer_namespace": {"inner_namespace": {"key": "count"}}}

Changes

  • Add UsageMultiSetCounter
  • Add unit test test_multi_set_counter

@joe4dev joe4dev added the semver: patch Non-breaking changes which can be included in patch releases label Nov 26, 2024
@joe4dev joe4dev added this to the Playground milestone Nov 26, 2024
@joe4dev joe4dev self-assigned this Nov 26, 2024
Copy link

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 48m 56s ⏱️ - 1m 12s
3 733 tests ±0  3 387 ✅ ±0  346 💤 ±0  0 ❌ ±0 
3 735 runs  ±0  3 387 ✅ ±0  348 💤 ±0  0 ❌ ±0 

Results for commit c926c7c. ± Comparison against base commit 95210a8.

@joe4dev
Copy link
Member Author

joe4dev commented Mar 24, 2025

Superseeded by new structured metric counters #12230

@joe4dev joe4dev closed this Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant