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

[es] Refactor the ES SpanWriter to make it reusable for v2 APIs #6796

Merged
merged 14 commits into from
Mar 6, 2025

Conversation

Manik2708
Copy link
Contributor

@Manik2708 Manik2708 commented Mar 3, 2025

Which problem is this PR solving?

Fixes a part of #6458

Description of the changes

  • The JsonSpanWriter accepts the json span instead of jaeger span which makes it reusabe in v2 storage APIs

How was this change tested?

  • Unit Tests

Checklist

@Manik2708
Copy link
Contributor Author

@mahadzaryab1 @yurishkuro I am bit confused for the directory structure of model. I have kept it in pkg/es, should I create a new package inside pkg/es for it?

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.04%. Comparing base (2c5cdc9) to head (fdb4ced).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6796   +/-   ##
=======================================
  Coverage   96.03%   96.04%           
=======================================
  Files         364      364           
  Lines       20702    20712   +10     
=======================================
+ Hits        19882    19892   +10     
  Misses        626      626           
  Partials      194      194           
Flag Coverage Δ
badger_v1 9.86% <0.00%> (-0.01%) ⬇️
badger_v2 1.98% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 14.87% <0.00%> (-0.02%) ⬇️
cassandra-4.x-v2-auto 1.97% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.97% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 14.87% <0.00%> (-0.02%) ⬇️
cassandra-5.x-v2-auto 1.97% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.97% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 19.26% <87.50%> (+0.06%) ⬆️
elasticsearch-7.x-v1 19.34% <87.50%> (+0.06%) ⬆️
elasticsearch-8.x-v1 19.51% <87.50%> (+0.06%) ⬆️
elasticsearch-8.x-v2 1.98% <0.00%> (-0.01%) ⬇️
grpc_v1 10.90% <0.00%> (-0.02%) ⬇️
grpc_v2 7.95% <0.00%> (-0.01%) ⬇️
kafka-3.x-v1 10.16% <0.00%> (-0.02%) ⬇️
kafka-3.x-v2 1.98% <0.00%> (-0.01%) ⬇️
memory_v2 1.98% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 19.39% <87.50%> (+0.06%) ⬆️
opensearch-2.x-v1 19.39% <87.50%> (+0.06%) ⬆️
opensearch-2.x-v2 1.98% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.48% <0.00%> (-0.01%) ⬇️
unittests 94.93% <100.00%> (+<0.01%) ⬆️

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.

@Manik2708 Manik2708 changed the title [es] Refactored the ES Span to make it reusable for v2 APIs [es] Refactored the ES SpanWriter to make it reusable for v2 APIs Mar 4, 2025
@Manik2708 Manik2708 requested a review from yurishkuro March 4, 2025 06:36
@Manik2708
Copy link
Contributor Author

@yurishkuro I have refactored with the way you said. Please review, once the apporach here is approved, same will be repeated for reader. But one thing which I want to ask is should we include CreateTemplates in JsonSpanWriter also? As it will also be needed in v2 APIs.

This reverts commit 68b066f.

Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
@Manik2708 Manik2708 requested a review from yurishkuro March 6, 2025 10:18
@Manik2708
Copy link
Contributor Author

@yurishkuro Does the new changes make sense?

Signed-off-by: Manik2708 <[email protected]>
Signed-off-by: Manik2708 <[email protected]>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

lgtm

@yurishkuro yurishkuro changed the title [es] Refactored the ES SpanWriter to make it reusable for v2 APIs [es] Refactor the ES SpanWriter to make it reusable for v2 APIs Mar 6, 2025
@yurishkuro yurishkuro enabled auto-merge March 6, 2025 20:21
@yurishkuro yurishkuro added this pull request to the merge queue Mar 6, 2025
Merged via the queue into jaegertracing:main with commit ccc61f1 Mar 6, 2025
56 of 57 checks passed
Asatyam pushed a commit to Asatyam/jaeger that referenced this pull request Mar 9, 2025
…ertracing#6796)

## Which problem is this PR solving?
Fixes a part of jaegertracing#6458 

## Description of the changes
- The JsonSpanWriter accepts the json span instead of jaeger span which
makes it reusabe in v2 storage APIs

## How was this change tested?
- Unit Tests

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

---------

Signed-off-by: Manik2708 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants