-
Notifications
You must be signed in to change notification settings - Fork 67
feat: add impact metric counter #386
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
Pull Request Test Coverage Report for Build 20592912994Details
💛 - Coveralls |
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.
Pull request overview
This pull request adds an impact metric counter implementation to the Python SDK, following the same pattern established in the Java SDK (unleash-java-sdk PR #336). The implementation provides a thread-safe counter with label support for tracking metrics.
Key changes:
- Implements a CounterImpl class with increment and collect operations
- Adds support for labeled metrics with label serialization/deserialization
- Includes comprehensive unit tests for counter functionality
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
UnleashClient/impact_metrics/metric_types.py |
Implements the core metric types including MetricType enum, MetricOptions dataclass, Counter protocol, and CounterImpl with thread-safe operations |
UnleashClient/impact_metrics/__init__.py |
Exports public API for the impact_metrics module |
tests/unit_tests/impact_metrics/test_metric_types.py |
Provides unit tests for counter increment, labeling, and collect behavior |
tests/unit_tests/impact_metrics/__init__.py |
Empty init file for test module |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Following pattern we did in java.
Does same implementation we had here Unleash/unleash-java-sdk#336