Skip to content

[es] Add missing scope and link fields to index templates#8643

Merged
yurishkuro merged 1 commit into
jaegertracing:mainfrom
Manik2708:es-templates
May 31, 2026
Merged

[es] Add missing scope and link fields to index templates#8643
yurishkuro merged 1 commit into
jaegertracing:mainfrom
Manik2708:es-templates

Conversation

@Manik2708

Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

Description of the changes

  • Required changes in index templates as one of the parts of the PR

How was this change tested?

  • Unit Tests

Checklist

AI Usage in this PR (choose one)

See AI Usage Policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Signed-off-by: Manik Mehta <mehtamanik96@gmail.com>
Copilot AI review requested due to automatic review settings May 26, 2026 13:48
@Manik2708 Manik2708 requested a review from a team as a code owner May 26, 2026 13:48
@Manik2708

Copy link
Copy Markdown
Contributor Author

@mahadzaryab1 One of the parts for the per-requisite, please review!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates Jaeger span Elasticsearch mappings (and fixtures) to support additional span context and scope-tag fields across ES 6/7/8.

Changes:

  • Add traceState, flags, and nested tags fields under the existing nested structure (e.g., references/links).
  • Add scopeTag.* dynamic-template mapping plus scopeTag/scopeTags fields to the top-level properties.
  • Mirror the same mapping updates into the mapping fixtures for each ES version.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/storage/v1/elasticsearch/mappings/jaeger-span-8.json Adds scope tag dynamic template + new span context fields and scopeTag/scopeTags properties for ES8 mapping.
internal/storage/v1/elasticsearch/mappings/jaeger-span-7.json Same mapping additions for ES7.
internal/storage/v1/elasticsearch/mappings/jaeger-span-6.json Same mapping additions for ES6 (with slightly different field ordering).
internal/storage/v1/elasticsearch/mappings/fixtures/jaeger-span-8.json Keeps ES8 fixture mapping in sync with the ES8 mapping changes.
internal/storage/v1/elasticsearch/mappings/fixtures/jaeger-span-7.json Keeps ES7 fixture mapping in sync with the ES7 mapping changes.
internal/storage/v1/elasticsearch/mappings/fixtures/jaeger-span-6.json Keeps ES6 fixture mapping in sync with the ES6 mapping changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +42 to +50
},
{
"scope_tags_map": {
"mapping": {
"type": "keyword",
"ignore_above": 256
},
"path_match": "scopeTag.*"
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

have we received such issue before? because the current pattern is just an extension of old pattern of span and process tags

"type": "keyword",
"ignore_above": 256
},
"path_match": "scopeTag.*"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

writer converts all the values to string before sending it to db although I thought of changing this but then I suspect that it might break the reader therefore I kept it same (reader is always expecting string values to be matched)

Comment on lines +148 to +154
"flags":{
"type":"integer"
},
"traceState":{
"type":"keyword",
"ignore_above":256
},
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.54%. Comparing base (6d5f071) to head (b8e29f9).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8643      +/-   ##
==========================================
- Coverage   96.57%   96.54%   -0.04%     
==========================================
  Files         334      334              
  Lines       17721    17721              
==========================================
- Hits        17114    17108       -6     
- Misses        455      459       +4     
- Partials      152      154       +2     
Flag Coverage Δ
badger_direct 8.94% <ø> (ø)
badger_e2e 1.04% <ø> (ø)
cassandra-4.x-direct-manual 14.55% <ø> (ø)
cassandra-4.x-e2e-auto 1.03% <ø> (ø)
cassandra-4.x-e2e-manual 1.03% <ø> (ø)
cassandra-5.x-direct-manual 14.55% <ø> (ø)
cassandra-5.x-e2e-auto 1.03% <ø> (ø)
cassandra-5.x-e2e-manual 1.03% <ø> (ø)
clickhouse-direct 8.97% <ø> (ø)
clickhouse-e2e 1.16% <ø> (ø)
elasticsearch-6.x-direct 16.87% <ø> (ø)
elasticsearch-7.x-direct 16.90% <ø> (ø)
elasticsearch-8.x-direct 17.05% <ø> (ø)
elasticsearch-8.x-e2e 1.04% <ø> (ø)
elasticsearch-9.x-e2e 1.09% <ø> (+0.04%) ⬆️
grpc_direct 7.89% <ø> (ø)
grpc_e2e 1.04% <ø> (ø)
kafka-3.x-v2 1.04% <ø> (ø)
memory_v2 1.04% <ø> (ø)
opensearch-1.x-direct 16.95% <ø> (ø)
opensearch-2.x-direct 16.95% <ø> (ø)
opensearch-2.x-e2e 1.04% <ø> (ø)
opensearch-3.x-e2e 1.04% <ø> (ø)
query 1.04% <ø> (ø)
tailsampling-processor 0.55% <ø> (ø)
unittests 94.85% <ø> (-0.04%) ⬇️

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
Copy Markdown

CI Summary Report

Metrics Comparison

⚠️ 36 metric change(s) detected (informational)

View changed metrics

For label-level diff details, open the CI run and expand the "Compare metrics and generate summary" step logs.

metrics_snapshot_elasticsearch_9.x_e2e⬇️ download diff
3 added

  • jaeger_storage_latency
  • jaeger_storage_requests
  • rpc_server_call_duration

Code Coverage

✅ Coverage 97.3% (baseline 97.3%)

➡️ View CI run | View publish logs
2026-05-26 14:16:09 UTC

"type":"keyword",
"ignore_above":256
},
"tags":{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what is this for? Why didn't we need it before?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

otel links have flags, tracestate and attributes which were earlier being skipped as dbmodel didn't have space to store them. adding this will make the dbmodel parallel to otel model

@mahadzaryab1 mahadzaryab1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me

@yurishkuro yurishkuro merged commit 10f8198 into jaegertracing:main May 31, 2026
75 of 78 checks passed
vic-comm pushed a commit to vic-comm/jaeger that referenced this pull request Jun 11, 2026
…ing#8643)

## Which problem is this PR solving?
- Pr-requisite of: jaegertracing#8473

## Description of the changes
- Required changes in index templates as one of the parts of the PR

## How was this change tested?
- Unit Tests

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/main/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: `make lint test`

## AI Usage in this PR (choose one)
See [AI Usage
Policy](https://github.com/jaegertracing/jaeger/blob/main/CONTRIBUTING_GUIDELINES.md#ai-usage-policy).
- [x] **None**: No AI tools were used in creating this PR
- [ ] **Light**: AI provided minor assistance (formatting, simple
suggestions)
- [ ] **Moderate**: AI helped with code generation or debugging specific
parts
- [ ] **Heavy**: AI generated most or all of the code changes

Signed-off-by: Manik Mehta <mehtamanik96@gmail.com>
Signed-off-by: Victor Chidera Obiezue <obiezuechidera@gmail.com>
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.

4 participants