Skip to content
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

fix(analytics): use HashSet to represent the returned metrics #5095

Open
lsampras opened this issue Jun 24, 2024 · 0 comments · May be fixed by #5179
Open

fix(analytics): use HashSet to represent the returned metrics #5095

lsampras opened this issue Jun 24, 2024 · 0 comments · May be fixed by #5179
Assignees
Labels
A-Analytics C-bug Category: Bug good first issue Good for newcomers

Comments

@lsampras
Copy link
Member

lsampras commented Jun 24, 2024

Currently we have 2 sources for analytics Clickhouse & Sqlx
Along with this we have a combined mode which helps compare for any differences in these results
However since currently we return a vector of results this causes an mismatch warning if the order is changed,
instead we should use a HashSet to store & compare these values.

async fn load_metrics(
&self,
dimensions: &[ApiEventDimensions],
merchant_id: &str,
filters: &ApiEventFilters,
granularity: &Option<Granularity>,
time_range: &TimeRange,
pool: &T,
) -> MetricsResult<Vec<(ApiEventMetricsBucketIdentifier, ApiEventMetricRow)>>;
}

we can also add a Counter metric to determine whenever these metrics are incorrect.

@lsampras lsampras added C-bug Category: Bug good first issue Good for newcomers A-Analytics labels Jun 24, 2024
@tsdk02 tsdk02 linked a pull request Jul 2, 2024 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Analytics C-bug Category: Bug good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants