Skip to content

Comments

[test] Upgrade integration tests fixtures to OTLP traces#8079

Open
Manik2708 wants to merge 3 commits intojaegertracing:mainfrom
Manik2708:all-fixture
Open

[test] Upgrade integration tests fixtures to OTLP traces#8079
Manik2708 wants to merge 3 commits intojaegertracing:mainfrom
Manik2708:all-fixture

Conversation

@Manik2708
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • All fixtures are upgraded to OTLP traces

How was this change tested?

  • Integration 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

…l_trace.json

Signed-off-by: Manik Mehta <mehtamanik96@gmail.com>
Signed-off-by: Manik Mehta <mehtamanik96@gmail.com>
Copilot AI review requested due to automatic review settings February 21, 2026 19:51
@Manik2708 Manik2708 requested a review from a team as a code owner February 21, 2026 19:51
@Manik2708
Copy link
Contributor Author

The script used here is (AI generated):

#!/usr/bin/env bash

# =========================
# CONFIGURATION (EDIT HERE)
# =========================

# Directory containing input files
INPUT_DIR="../../internal/storage/integration/fixtures/traces"

# Go file to execute (no binary generation)
GO_MAIN="main.go"

# Files to skip
SKIP_FILES=(
  "default.json"
  "span_tags_trace.json"
)

# =========================
# SCRIPT LOGIC (DON'T EDIT)
# =========================

# Ensure directory exists
if [[ ! -d "$INPUT_DIR" ]]; then
  echo "Error: Directory does not exist -> $INPUT_DIR"
  exit 1
fi

# Ensure main.go exists
if [[ ! -f "$GO_MAIN" ]]; then
  echo "Error: main.go not found -> $GO_MAIN"
  exit 1
fi

# Ensure Go is installed
if ! command -v go >/dev/null 2>&1; then
  echo "Error: Go is not installed or not in PATH"
  exit 1
fi

# Function to check if a file is in skip list
should_skip() {
  local file="$1"
  for skip in "${SKIP_FILES[@]}"; do
    [[ "$file" == "$skip" ]] && return 0
  done
  return 1
}

# Iterate over files
for file_path in "$INPUT_DIR"/*; do
  [[ -f "$file_path" ]] || continue

  # filename WITHOUT path and WITHOUT .json
  file_name="$(basename "$file_path" .json)"

  if should_skip "$file_name.json"; then
    echo "Skipping: $file_name.json"
    continue
  fi

  echo "Processing: $file_name"
  go run "$GO_MAIN" --root-path "$INPUT_DIR" --in-file "$file_name"

done

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request converts integration test trace fixtures from the v1 Jaeger model format to the OTLP (OpenTelemetry Protocol) format. This is part of the larger effort tracked in issue #7050 to upgrade the e2e storage tests to use the v2 Storage API and OTLP data model. The conversion enables better testing of OTLP-specific features such as scope attributes that are not adequately represented in the v1 model.

Changes:

  • Converted 28 trace fixture JSON files from v1 model format (with spans, process, tags, logs, references) to OTLP format (with resourceSpans, scopeSpans, attributes, events, links)
  • Added trace sorting calls in the trace-converter validation function to ensure deterministic comparison when converting between formats

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/storage/integration/fixtures/traces/tags_wildcard_regex_2.json Converted to OTLP format with resource attributes for service.name and span attributes
internal/storage/integration/fixtures/traces/tags_wildcard_regex_1.json Converted to OTLP format with resource attributes for service.name and span attributes
internal/storage/integration/fixtures/traces/tags_opname_trace.json Converted to OTLP format including transformation of references to links with opentracing.ref_type attributes
internal/storage/integration/fixtures/traces/tags_opname_maxdur_trace.json Converted to OTLP format with process tags moved to resource attributes and logs to events
internal/storage/integration/fixtures/traces/tags_opname_dur_trace.json Converted to OTLP format with logs transformed to span events
internal/storage/integration/fixtures/traces/tags_maxdur_trace.json Converted to OTLP format with process tags moved to resource attributes
internal/storage/integration/fixtures/traces/tags_escaped_operator_trace_2.json Converted to OTLP format with span attributes and events
internal/storage/integration/fixtures/traces/tags_escaped_operator_trace_1.json Converted to OTLP format with span attributes and events
internal/storage/integration/fixtures/traces/tags_dur_trace.json Converted to OTLP format with span attributes
internal/storage/integration/fixtures/traces/process_tags_trace.json Converted to OTLP format with process tags moved to resource attributes
internal/storage/integration/fixtures/traces/opname_trace.json Converted to OTLP format with operation name as span name
internal/storage/integration/fixtures/traces/opname_maxdur_trace.json Converted to OTLP format with parent-child span relationships using parentSpanId
internal/storage/integration/fixtures/traces/opname_dur_trace.json Converted to OTLP format with span name and events
internal/storage/integration/fixtures/traces/multispottag_opname_trace.json Converted to OTLP format with tags distributed across resource, span attributes, and event attributes
internal/storage/integration/fixtures/traces/multispottag_opname_maxdur_trace.json Converted to OTLP format with multi-location tag placement
internal/storage/integration/fixtures/traces/multispottag_opname_dur_trace.json Converted to OTLP format with multi-location tag placement
internal/storage/integration/fixtures/traces/multispottag_maxdur_trace.json Converted to OTLP format with multi-location tag placement
internal/storage/integration/fixtures/traces/multispottag_dur_trace.json Converted to OTLP format with multi-location tag placement
internal/storage/integration/fixtures/traces/multiple3_trace.json Converted to OTLP format with basic span structure
internal/storage/integration/fixtures/traces/multiple2_trace.json Converted to OTLP format with basic span structure
internal/storage/integration/fixtures/traces/multiple1_trace.json Converted to OTLP format with basic span structure
internal/storage/integration/fixtures/traces/multi_spot_tags_trace.json Converted to OTLP format with tags in multiple locations
internal/storage/integration/fixtures/traces/multi_index_trace.json Converted to OTLP format with multiple spans and different timestamps
internal/storage/integration/fixtures/traces/max_dur_trace.json Converted to OTLP format with duration-based span
internal/storage/integration/fixtures/traces/log_tags_trace.json Converted to OTLP format with log tags transformed to event attributes
internal/storage/integration/fixtures/traces/example_trace.json Converted to OTLP format with multiple resources, spans, and span kinds
internal/storage/integration/fixtures/traces/dur_trace.json Converted to OTLP format with duration-based span
cmd/trace-converter/main.go Added model.SortTrace() calls to ensure deterministic trace ordering before comparison

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

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.48%. Comparing base (dfec2ab) to head (2567aa6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8079      +/-   ##
==========================================
- Coverage   95.50%   95.48%   -0.02%     
==========================================
  Files         316      316              
  Lines       16735    16735              
==========================================
- Hits        15982    15980       -2     
- Misses        588      590       +2     
  Partials      165      165              
Flag Coverage Δ
badger_v1 9.03% <ø> (-0.09%) ⬇️
badger_v2 1.03% <ø> (-0.30%) ⬇️
cassandra-4.x-v1-manual 13.21% <ø> (-0.09%) ⬇️
cassandra-4.x-v2-auto 1.02% <ø> (-0.30%) ⬇️
cassandra-4.x-v2-manual 1.02% <ø> (-0.30%) ⬇️
cassandra-5.x-v1-manual 13.21% <ø> (-0.09%) ⬇️
cassandra-5.x-v2-auto 1.02% <ø> (-0.30%) ⬇️
cassandra-5.x-v2-manual 1.02% <ø> (-0.30%) ⬇️
clickhouse 1.11% <ø> (-0.30%) ⬇️
elasticsearch-6.x-v1 16.88% <ø> (ø)
elasticsearch-7.x-v1 16.91% <ø> (ø)
elasticsearch-8.x-v1 17.06% <ø> (ø)
elasticsearch-8.x-v2 1.03% <ø> (-0.30%) ⬇️
elasticsearch-9.x-v2 1.03% <ø> (-0.30%) ⬇️
grpc_v1 7.76% <ø> (-0.32%) ⬇️
grpc_v2 1.03% <ø> (-0.30%) ⬇️
kafka-3.x-v2 1.03% <ø> (-0.30%) ⬇️
memory_v2 1.03% <ø> (-0.30%) ⬇️
opensearch-1.x-v1 16.96% <ø> (ø)
opensearch-2.x-v1 16.96% <ø> (ø)
opensearch-2.x-v2 1.03% <ø> (-0.30%) ⬇️
opensearch-3.x-v2 1.03% <ø> (-0.30%) ⬇️
query 1.03% <ø> (-0.30%) ⬇️
tailsampling-processor 0.52% <ø> (ø)
unittests 94.17% <ø> (-0.02%) ⬇️

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.

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.

1 participant