-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Step Functions: Migrate Usage Metrics to New Counter Standards #12389
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
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 32m 8s ⏱️ - 1h 19m 53s Results for commit 27aace5. ± Comparison against base commit c3bf23a. This pull request removes 2836 and adds 1 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
error_counter = UsageCounter("stepfunctions:error") | ||
# Initialize a counter to record the usage of language features for each state machine. | ||
language_features_counter = Counter( | ||
namespace="stepfunctions", name="language_features_used", labels=["query_language", "variables"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not-blocking: for the label variables, we might consider naming it are_variables_used
or uses_variables
, which makes the intent even clearer. What do you think?
Could you please provide some guidance on how to trigger these StepFunctions "functions" locally? This would allow me to test the changes end-to-end, send events to Tinybird, and give you a chance to run queries on the test data before merging the PR. That way, we’ll have time to adjust the counter and refine the labels if needed 💪🏼 You can run the queries in the playground I shared with you: Playground |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍 I'm happy to see that you’ve condensed the three events into a single one, that was exactly one of the goal of the counter refactoring 🚀
Motivation
This PR migrates our step functions usage metrics to the new Counter standards. It increases transparency by accurately reflecting the query language usage within each state machine. Previously, JSONata was always counted as used—even when combined with JSONPath. Since interleaved usage of both modes is critical for testing the shared memory model and understanding user reliance on this mechanism, the updated metrics now provide a clearer picture.
Changes