Skip to content

Conversation

@Manik2708
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • This marks the first step to upgrade cassandra backend to v2. The v1 CoreSpanWriter is seperated from v1 SpanWriter

How was this change tested?

  • Unit and Integration tests

Checklist

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.57%. Comparing base (69bf65c) to head (6a1b2ff).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7699      +/-   ##
==========================================
+ Coverage   95.55%   95.57%   +0.02%     
==========================================
  Files         307      308       +1     
  Lines       15395    15407      +12     
==========================================
+ Hits        14710    14726      +16     
+ Misses        537      534       -3     
+ Partials      148      147       -1     
Flag Coverage Δ
badger_v1 9.72% <0.00%> (-0.02%) ⬇️
badger_v2 2.03% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 14.19% <67.50%> (+0.09%) ⬆️
cassandra-4.x-v2-auto 2.02% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 2.02% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 14.19% <67.50%> (+0.09%) ⬆️
cassandra-5.x-v2-auto 2.02% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 2.02% <0.00%> (-0.01%) ⬇️
clickhouse 1.95% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.57% <0.00%> (-0.03%) ⬇️
elasticsearch-7.x-v1 18.60% <0.00%> (-0.03%) ⬇️
elasticsearch-8.x-v1 18.77% <0.00%> (-0.03%) ⬇️
elasticsearch-8.x-v2 2.03% <0.00%> (-0.01%) ⬇️
elasticsearch-9.x-v2 2.12% <0.00%> (+0.08%) ⬆️
grpc_v1 9.59% <0.00%> (-0.02%) ⬇️
grpc_v2 2.03% <0.00%> (-0.01%) ⬇️
kafka-3.x-v2 2.03% <0.00%> (-0.01%) ⬇️
memory_v2 2.03% <0.00%> (-0.01%) ⬇️
opensearch-1.x-v1 18.65% <0.00%> (-0.03%) ⬇️
opensearch-2.x-v1 18.65% <0.00%> (-0.03%) ⬇️
opensearch-2.x-v2 2.03% <0.00%> (-0.01%) ⬇️
opensearch-3.x-v2 2.03% <0.00%> (-0.01%) ⬇️
query 2.03% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.58% <0.00%> (-0.01%) ⬇️
unittests 94.10% <82.50%> (-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 Dec 5, 2025

Metrics Comparison Summary

Total changes across all snapshots: 73

Detailed changes per snapshot

summary_metrics_snapshot_elasticsearch

📊 Metrics Diff Summary

Total Changes: 73

  • 🆕 Added: 0 metrics
  • ❌ Removed: 73 metrics
  • 🔄 Modified: 0 metrics

❌ Removed Metrics

  • jaeger_storage_latency_seconds (18 variants)
View diff sample
-jaeger_storage_latency_seconds{le="+Inf",name="some_storage",operation="find_traces",otel_scope_name="jaeger-v2",otel_scope_schema_url="",otel_scope_version="",result="err",role="tracestore"}
-jaeger_storage_latency_seconds{le="0",name="some_storage",operation="find_traces",otel_scope_name="jaeger-v2",otel_scope_schema_url="",otel_scope_version="",result="err",role="tracestore"}
-jaeger_storage_latency_seconds{le="10",name="some_storage",operation="find_traces",otel_scope_name="jaeger-v2",otel_scope_schema_url="",otel_scope_version="",result="err",role="tracestore"}
-jaeger_storage_latency_seconds{le="100",name="some_storage",operation="find_traces",otel_scope_name="jaeger-v2",otel_scope_schema_url="",otel_scope_version="",result="err",role="tracestore"}
-jaeger_storage_latency_seconds{le="1000",name="some_storage",operation="find_traces",otel_scope_name="jaeger-v2",otel_scope_schema_url="",otel_scope_version="",result="err",role="tracestore"}
-jaeger_storage_latency_seconds{le="10000",name="some_storage",operation="find_traces",otel_scope_name="jaeger-v2",otel_scope_schema_url="",otel_scope_version="",result="err",role="tracestore"}
-jaeger_storage_latency_seconds{le="25",name="some_storage",operation="find_traces",otel_scope_name="jaeger-v2",otel_scope_schema_url="",otel_scope_version="",result="err",role="tracestore"}
...
- `jaeger_storage_requests` (1 variants)
View diff sample
-jaeger_storage_requests{name="some_storage",operation="find_traces",otel_scope_name="jaeger-v2",otel_scope_schema_url="",otel_scope_version="",result="err",role="tracestore"}
- `rpc_server_duration_milliseconds` (18 variants)
View diff sample
-rpc_server_duration_milliseconds{le="+Inf",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_duration_milliseconds{le="0",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_duration_milliseconds{le="10",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_duration_milliseconds{le="100",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_duration_milliseconds{le="1000",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_duration_milliseconds{le="10000",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_duration_milliseconds{le="25",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
...
- `rpc_server_requests_per_rpc` (18 variants)
View diff sample
-rpc_server_requests_per_rpc{le="+Inf",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_requests_per_rpc{le="0",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_requests_per_rpc{le="10",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_requests_per_rpc{le="100",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_requests_per_rpc{le="1000",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_requests_per_rpc{le="10000",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_requests_per_rpc{le="25",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
...
- `rpc_server_responses_per_rpc` (18 variants)
View diff sample
-rpc_server_responses_per_rpc{le="+Inf",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_responses_per_rpc{le="0",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_responses_per_rpc{le="10",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_responses_per_rpc{le="100",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_responses_per_rpc{le="1000",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_responses_per_rpc{le="10000",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
-rpc_server_responses_per_rpc{le="25",otel_scope_name="go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc",otel_scope_schema_url="https://opentelemetry.io/schemas/1.37.0",otel_scope_version="0.64.0",rpc_grpc_status_code="2",rpc_method="FindTraces",rpc_service="jaeger.api_v3.QueryService",rpc_system="grpc"}
...

➡️ View full metrics file

@yurishkuro
Copy link
Member

I don't follow why there are business logic changes in this PR if the objective is just refactoring to make it reusable?

@Manik2708
Copy link
Contributor Author

I don't follow why there are business logic changes in this PR if the objective is just refactoring to make it reusable?

There are no business logic changes in this PR. It's just that we implemented CoreSpanWriter which accepts dbmodel.Span (very similar to Elasticsearch approach)

@yurishkuro
Copy link
Member

There are no business logic changes in this PR. I

For example, this is removed. How is that not a business logic change?

tagFilter            dbmodel.TagFilter

@Manik2708
Copy link
Contributor Author

There are no business logic changes in this PR. I

For example, this is removed. How is that not a business logic change?

tagFilter            dbmodel.TagFilter

That is removed from CoreSpanWriter and added to SpanWriterV1. This is done because tagFilter is used for filtering tag from model.Span, which should not be the part of core writer but that of v1 writer

@yurishkuro
Copy link
Member

which should not be the part of core writer but that of v1 writer

why?

@Manik2708
Copy link
Contributor Author

which should not be the part of core writer but that of v1 writer

why

tagFilter is used in this method:

for _, v := range dbmodel.GetAllUniqueTags(span, s.tagFilter) {
which is using model.Span, that means it is used for conversion of Tags to dbmodel.TagInsertion and conversion should be in v1 writer not in core writer

@yurishkuro
Copy link
Member

filtering tags is not about conversion but about indexing or not indexing them in the db

@Manik2708
Copy link
Contributor Author

filtering tags is not about conversion but about indexing or not indexing them in the db

Yes but what we need is dbmodel.TagInsertion from model.Span.Tags. Should I try extracting TagInsertion from dbmodel.Span.Tags rather than from model.Span.Tags?

@Manik2708
Copy link
Contributor Author

filtering tags is not about conversion but about indexing or not indexing them in the db

Yes but what we need is dbmodel.TagInsertion from model.Span.Tags. Should I try extracting TagInsertion from dbmodel.Span.Tags rather than from model.Span.Tags?

As that would need to refactor the whole TagFilter interface. Should we do that?

@yurishkuro
Copy link
Member

As that would need to refactor the whole TagFilter interface. Should we do that?

We can change that interface to work entirely on the dbmodel input.

@Manik2708
Copy link
Contributor Author

As that would need to refactor the whole TagFilter interface. Should we do that?

We can change that interface to work entirely on the dbmodel input.

@yurishkuro I was trying to refactor the TagFilter. The only problem is that, we have to implement Compare, Equal and AsString for db.KeyValue. This is not very hard but I just want to confirm whether should we implement them (we need them for sorting)

@yurishkuro
Copy link
Member

it's fine

yurishkuro pushed a commit that referenced this pull request Dec 16, 2025
## Which problem is this PR solving?
- Fixes a part of: #6458 

## Description of the changes
- This is a blocker of #7699, we need to refactor `TagFilter` to accept
`dbmodel.Span` rather than `model.Span`

## How was this change tested?
- Unit And Integration 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 <[email protected]>
Signed-off-by: Manik Mehta <[email protected]>
Comment on lines +22 to +26
StringType = "string"
BoolType = "bool"
Int64Type = "int64"
Float64Type = "float64"
BinaryType = "binary"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the reason of doing this is because we need them in writer_test and following the same we may require them in writer v2 also

@Manik2708 Manik2708 requested a review from yurishkuro December 17, 2025 09:27
SoumyaRaikwar pushed a commit to SoumyaRaikwar/jaeger that referenced this pull request Dec 18, 2025
…ing#7707)

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

## Description of the changes
- This is a blocker of jaegertracing#7699, we need to refactor `TagFilter` to accept
`dbmodel.Span` rather than `model.Span`

## How was this change tested?
- Unit And Integration 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 <[email protected]>
Signed-off-by: SoumyaRaikwar <[email protected]>
@Manik2708 Manik2708 marked this pull request as draft December 19, 2025 07:58
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