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

[refactor] Move model<->otlp translation from jptrace to v1adapter #6414

Merged
merged 3 commits into from
Dec 25, 2024

Conversation

mahadzaryab1
Copy link
Collaborator

Description of the changes

  • Move model<->otlp translation from jptrace to v1adapter to keep jptrace specific to helper around the ptrace domain objects.

How was this change tested?

  • CI

Checklist

@@ -24,7 +25,7 @@ func ProtoFromTraces(traces ptrace.Traces) []*model.Batch {
// to OpenTelemetry traces (ptrace.Traces).
func ProtoToTraces(batches []*model.Batch) ptrace.Traces {
Copy link
Member

Choose a reason for hiding this comment

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

can we change the name of the function? E.g. ModelBatchesToTraces. Because in some cases it's also useful to have model.Trace as input/output, not just model.Batch, and the naming does not allow that.

Copy link
Member

Choose a reason for hiding this comment

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

or even better V1BatchesToTraces

Copy link

codecov bot commented Dec 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.25%. Comparing base (41e02d7) to head (bba15ea).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6414   +/-   ##
=======================================
  Coverage   96.25%   96.25%           
=======================================
  Files         368      368           
  Lines       20979    20979           
=======================================
  Hits        20193    20193           
  Misses        601      601           
  Partials      185      185           
Flag Coverage Δ
badger_v1 8.94% <0.00%> (ø)
badger_v2 1.84% <18.18%> (ø)
cassandra-4.x-v1-manual 14.87% <0.00%> (ø)
cassandra-4.x-v2-auto 1.78% <18.18%> (ø)
cassandra-4.x-v2-manual 1.78% <18.18%> (ø)
cassandra-5.x-v1-manual 14.87% <0.00%> (ø)
cassandra-5.x-v2-auto 1.78% <18.18%> (ø)
cassandra-5.x-v2-manual 1.78% <18.18%> (ø)
elasticsearch-6.x-v1 18.55% <0.00%> (ø)
elasticsearch-7.x-v1 18.63% <0.00%> (+<0.01%) ⬆️
elasticsearch-8.x-v1 18.79% <0.00%> (ø)
elasticsearch-8.x-v2 1.84% <18.18%> (ø)
grpc_v1 10.60% <0.00%> (ø)
grpc_v2 8.11% <18.18%> (ø)
kafka-2.x-v1 9.30% <0.00%> (ø)
kafka-2.x-v2 1.84% <18.18%> (ø)
kafka-3.x-v1 9.30% <0.00%> (ø)
kafka-3.x-v2 1.84% <18.18%> (ø)
memory_v2 1.84% <18.18%> (ø)
opensearch-1.x-v1 18.68% <0.00%> (+<0.01%) ⬆️
opensearch-2.x-v1 18.68% <0.00%> (+<0.01%) ⬆️
opensearch-2.x-v2 1.83% <18.18%> (ø)
tailsampling-processor 0.46% <0.00%> (ø)
unittests 95.11% <100.00%> (ø)

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.

Signed-off-by: Mahad Zaryab <[email protected]>
@mahadzaryab1 mahadzaryab1 enabled auto-merge (squash) December 25, 2024 22:37
@mahadzaryab1 mahadzaryab1 merged commit b02c559 into jaegertracing:main Dec 25, 2024
56 checks passed
Manik2708 pushed a commit to Manik2708/jaeger that referenced this pull request Jan 5, 2025
jaegertracing#6414)

## Description of the changes
- Move model<->otlp translation from `jptrace` to `v1adapter` to keep
`jptrace` specific to helper around the `ptrace` domain objects.

## How was this change tested?
- CI

## 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: Mahad Zaryab <[email protected]>
@mahadzaryab1 mahadzaryab1 deleted the move-translator branch January 6, 2025 00:42
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