Skip to content

Comments

[cassandra] Add omitempty notation for KeyValue and marshaller/unmarshaller for TraceID#7867

Merged
yurishkuro merged 4 commits intojaegertracing:mainfrom
Manik2708:cass-model
Jan 19, 2026
Merged

[cassandra] Add omitempty notation for KeyValue and marshaller/unmarshaller for TraceID#7867
yurishkuro merged 4 commits intojaegertracing:mainfrom
Manik2708:cass-model

Conversation

@Manik2708
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Currently while writing snapshot tests for conversion, TraceID is abruptly formatted because of array representation of it. Unmarshaller/Marshaller will convert them to hex string.

How was this change tested?

  • Unit Tests

Checklist

…r/unmarshaller for TraceId

Signed-off-by: Manik Mehta <mehtamanik96@gmail.com>
Signed-off-by: Manik Mehta <mehtamanik96@gmail.com>
Comment on lines +26 to +33
func (t TraceID) String() string {
traceIDHigh := binary.BigEndian.Uint64(t[:8])
traceIDLow := binary.BigEndian.Uint64(t[8:])
if traceIDHigh == 0 {
return fmt.Sprintf("%016x", traceIDLow)
}
return fmt.Sprintf("%016x%016x", traceIDHigh, traceIDLow)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

string function was previously dependent on ToDomain now we want to get rid of v1 models so I made it independent of ToDomain

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.51%. Comparing base (0954788) to head (416a562).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7867      +/-   ##
==========================================
+ Coverage   95.49%   95.51%   +0.01%     
==========================================
  Files         305      306       +1     
  Lines       16174    16195      +21     
==========================================
+ Hits        15445    15468      +23     
+ Misses        571      570       -1     
+ Partials      158      157       -1     
Flag Coverage Δ
badger_v1 9.17% <0.00%> (-0.03%) ⬇️
badger_v2 1.93% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 13.59% <33.33%> (+<0.01%) ⬆️
cassandra-4.x-v2-auto 1.92% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.92% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 13.59% <33.33%> (+<0.01%) ⬆️
cassandra-5.x-v2-auto 1.92% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.92% <0.00%> (-0.01%) ⬇️
clickhouse 1.97% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 17.50% <0.00%> (-0.04%) ⬇️
elasticsearch-7.x-v1 17.54% <0.00%> (-0.05%) ⬇️
elasticsearch-8.x-v1 17.69% <0.00%> (-0.05%) ⬇️
elasticsearch-8.x-v2 1.93% <0.00%> (-0.01%) ⬇️
elasticsearch-9.x-v2 1.93% <0.00%> (-0.01%) ⬇️
grpc_v1 8.83% <0.00%> (-0.03%) ⬇️
grpc_v2 1.93% <0.00%> (-0.01%) ⬇️
kafka-3.x-v2 1.93% <0.00%> (-0.01%) ⬇️
memory_v2 1.93% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 17.58% <0.00%> (-0.05%) ⬇️
opensearch-2.x-v1 17.58% <0.00%> (-0.05%) ⬇️
opensearch-2.x-v2 1.93% <0.00%> (-0.01%) ⬇️
opensearch-3.x-v2 1.93% <0.00%> (-0.01%) ⬇️
query 1.93% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.55% <0.00%> (-0.01%) ⬇️
unittests 94.15% <92.59%> (+<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.

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Metrics Comparison Summary

Total changes across all snapshots: 0

Detailed changes per snapshot

summary_metrics_snapshot_cassandra

📊 Metrics Diff Summary

Total Changes: 0

  • 🆕 Added: 0 metrics
  • ❌ Removed: 0 metrics
  • 🔄 Modified: 0 metrics
  • 🚫 Excluded: 53 metrics

summary_metrics_snapshot_cassandra

📊 Metrics Diff Summary

Total Changes: 0

  • 🆕 Added: 0 metrics
  • ❌ Removed: 0 metrics
  • 🔄 Modified: 0 metrics
  • 🚫 Excluded: 53 metrics

summary_metrics_snapshot_cassandra

📊 Metrics Diff Summary

Total Changes: 0

  • 🆕 Added: 0 metrics
  • ❌ Removed: 0 metrics
  • 🔄 Modified: 0 metrics
  • 🚫 Excluded: 106 metrics

➡️ View full metrics file

Signed-off-by: Manik Mehta <mehtamanik96@gmail.com>
@yurishkuro yurishkuro added the changelog:refactoring Internal code refactoring without functional changes label Jan 19, 2026
@yurishkuro yurishkuro merged commit d12d147 into jaegertracing:main Jan 19, 2026
59 of 60 checks passed
Manik2708 added a commit to Manik2708/jaeger that referenced this pull request Jan 20, 2026
…rshaller for `TraceID` (jaegertracing#7867)

## Which problem is this PR solving?
- Needed for: jaegertracing#7844

## Description of the changes
- Currently while writing snapshot tests for conversion, `TraceID` is
abruptly formatted because of array representation of it.
Unmarshaller/Marshaller will convert them to hex string.

## 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: Manik Mehta <mehtamanik96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/storage changelog:refactoring Internal code refactoring without functional changes enhancement storage/cassandra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants