Skip to content

Conversation

@sjaanus
Copy link
Contributor

@sjaanus sjaanus commented Dec 30, 2025

Following pattern we did in java.

Does same implementation we had here Unleash/unleash-java-sdk#336

@coveralls
Copy link

Pull Request Test Coverage Report for Build 20592912994

Details

  • 65 of 65 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.6%) to 93.984%

Totals Coverage Status
Change from base Build 19699333839: 0.6%
Covered Lines: 703
Relevant Lines: 748

💛 - Coveralls

Copy link

Copilot AI left a 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.

@FredrikOseberg FredrikOseberg moved this from New to In Progress in Issues and PRs Jan 6, 2026
@sjaanus sjaanus closed this Jan 6, 2026
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants