Skip to content

Conversation

pipiland2612
Copy link
Contributor

@pipiland2612 pipiland2612 commented Jul 6, 2025

Which problem is this PR solving?

Description of the changes

  • Introduce QueryBuilder
  • Add comment for struct for better clarity

How was this change tested?

  • make lint test

Checklist

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
@pipiland2612 pipiland2612 requested a review from a team as a code owner July 6, 2025 18:51
@pipiland2612 pipiland2612 requested a review from jkowall July 6, 2025 18:51
@pipiland2612 pipiland2612 changed the title Refactor reader Refactor metricstore/es/reader.go by introducing queryBuilder Jul 6, 2025
@yurishkuro yurishkuro added the changelog:refactoring Internal code refactoring without functional changes label Jul 6, 2025
@yurishkuro yurishkuro enabled auto-merge July 6, 2025 18:54

// These constants define the specific names of aggregations used within Elasticsearch
// queries. They are crucial for both constructing the query sent to Elasticsearch
// and for correctly extracting the corresponding data from the Elasticsearch response.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @yurishkuro, since these constants are also important for retrieve results from raw ES result, they can also be used in another file (to_domain.go, reader.go)

Copy link

codecov bot commented Jul 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.16%. Comparing base (762eaad) to head (c0389d5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7297      +/-   ##
==========================================
- Coverage   96.18%   96.16%   -0.02%     
==========================================
  Files         374      375       +1     
  Lines       22750    22733      -17     
==========================================
- Hits        21882    21862      -20     
- Misses        655      657       +2     
- Partials      213      214       +1     
Flag Coverage Δ
badger_v1 9.03% <ø> (ø)
badger_v2 1.78% <0.00%> (+<0.01%) ⬆️
cassandra-4.x-v1-manual 11.93% <ø> (ø)
cassandra-4.x-v2-auto 1.77% <0.00%> (+<0.01%) ⬆️
cassandra-4.x-v2-manual 1.77% <0.00%> (+<0.01%) ⬆️
cassandra-5.x-v1-manual 11.93% <ø> (ø)
cassandra-5.x-v2-auto 1.77% <0.00%> (+<0.01%) ⬆️
cassandra-5.x-v2-manual 1.77% <0.00%> (+<0.01%) ⬆️
elasticsearch-6.x-v1 16.69% <ø> (ø)
elasticsearch-7.x-v1 16.73% <ø> (ø)
elasticsearch-8.x-v1 16.89% <ø> (ø)
elasticsearch-8.x-v2 1.87% <0.00%> (+0.09%) ⬆️
grpc_v1 10.43% <ø> (ø)
grpc_v2 1.78% <0.00%> (+<0.01%) ⬆️
kafka-3.x-v1 9.35% <ø> (ø)
kafka-3.x-v2 1.78% <0.00%> (-0.12%) ⬇️
memory_v2 1.78% <0.00%> (+<0.01%) ⬆️
opensearch-1.x-v1 16.78% <ø> (ø)
opensearch-2.x-v1 16.78% <ø> (ø)
opensearch-2.x-v2 1.78% <0.00%> (+<0.01%) ⬆️
query 1.78% <0.00%> (+<0.01%) ⬆️
tailsampling-processor 0.49% <0.00%> (+<0.01%) ⬆️
unittests 95.09% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yurishkuro yurishkuro added this pull request to the merge queue Jul 6, 2025
Merged via the queue into jaegertracing:main with commit c41547b Jul 6, 2025
61 of 62 checks passed
@pipiland2612 pipiland2612 deleted the refactor_reader branch July 6, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:refactoring Internal code refactoring without functional changes storage/elasticsearch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants