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

Add emitWorkflowTypeCountMetricsPinot in ESAnalyzer #6177

Merged
merged 8 commits into from
Jul 23, 2024

Conversation

bowenxia
Copy link
Contributor

@bowenxia bowenxia commented Jul 19, 2024

What changed?

  • Add emitWorkflowTypeCountMetricsPinot in ESAnalyzer,
  • Add pinot aggregation query that has similar result as ES. (Note: since Aggr clause in ES by default only returns the top 10 count, I've set a limit 10 in Pinot to mimic this behavior)
  • Because previously the Search function in Pinot Client doesn't return the struct we need for Aggr, I've also implemented another method called SearchAggr for Pinot.GenericClient interface and for PinotClient class.
  • Update unit test accordingly.

Why?
To upgrade ESAnalayzer to be Visibility Analyzer

How did you test it?
Unit test

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Jul 19, 2024

Codecov Report

Attention: Patch coverage is 97.14286% with 2 lines in your changes missing coverage. Please review.

Project coverage is 72.78%. Comparing base (736d66b) to head (b6005b1).
Report is 1 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
common/pinot/pinot_client.go 91.42% <100.00%> (+0.80%) ⬆️
service/worker/esanalyzer/analyzer.go 38.46% <100.00%> (+1.20%) ⬆️
...rker/esanalyzer/domainWorkflowTypeCountWorkflow.go 83.03% <96.82%> (+8.52%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 736d66b...b6005b1. Read the comment docs.

@bowenxia bowenxia enabled auto-merge (squash) July 23, 2024 22:02
@bowenxia bowenxia merged commit 95ba44c into master Jul 23, 2024
19 checks passed
@bowenxia bowenxia deleted the xbowen_refactor_ESanalyzer_01 branch July 23, 2024 22:34
return fmt.Sprintf(`
SELECT WorkflowType, COUNT(*) AS count
FROM %s
WHERE DomainID = '%s'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: %q

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%q here might not work because double quote doesn't work in Pinot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants