Skip to content

Add execution instrumentation for Karate v2 - #11928

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
daniel.mohedano/karate-v2-execution
Jul 15, 2026
Merged

Add execution instrumentation for Karate v2#11928
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
daniel.mohedano/karate-v2-execution

Conversation

@daniel-mohedano

@daniel-mohedanodaniel-mohedano commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

  • Implements execution instrumentation for the new Karate v2
  • This instrumentation is responsible for all features related to modifying the execution of tests:
    • Early Flake Detection
    • Auto Test Retries
    • Flaky Test Management Policies

Motivation

Karate v2 is a complete ground-up rewrite of the framework. Because of this, the original karate-1.0 module cannot instrument it. This PR builds upon the changes introduced in #11923

Additional Notes

Most LOC are related to instrumentation tests' span fixtures.

Contributor Checklist

Jira ticket: SDTEST-3816

@daniel-mohedanodaniel-mohedano added type: feature Enhancements and improvements comp: ci visibility Continuous Integration Visibility tag: ai generated Largely based on code generated by an AI or LLM labels Jul 13, 2026
@daniel-mohedano

Copy link
Copy Markdown
ContributorAuthor

@codex review

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7daBot commented Jul 13, 2026

Copy link
Copy Markdown

Test Environment - sbt-scalatest

Job Status: 🔴 failed

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@datadog-datadog-us1-prod

datadog-datadog-us1-prodBot commented Jul 13, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 69.73% (+12.53%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 969df18 | Docs | Datadog PR Page | Give us feedback!

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7daBot commented Jul 13, 2026

Copy link
Copy Markdown

Test Environment - nebula-release-plugin

Job Status: 🟢 success

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)
agent-36.1537.15$\color{green}{\blacktriangledown}$ -73.3036.42$\color{green}{\blacktriangledown}$ -72.5737/119
agentless-36.7436.42$\color{green}{\blacktriangledown}$ -73.1636.42$\color{green}{\blacktriangledown}$ -73.1637/119
agentlessCodeCoverage-33.3445.38$\color{green}{\blacktriangledown}$ -78.7244.48$\color{green}{\blacktriangledown}$ -77.8237/119
agentlessLineCoverage-18.4674.82$\color{green}{\blacktriangledown}$ -93.2874.82$\color{green}{\blacktriangledown}$ -93.2836/118

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7daBot commented Jul 13, 2026

Copy link
Copy Markdown

Test Environment - pass4s

Job Status: 🔴 failed

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7daBot commented Jul 13, 2026

Copy link
Copy Markdown

Test Environment - reactive-streams-jvm

Job Status: 🟢 success

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)
agent22.0221.65$\color{red}{\blacktriangle}$ +0.3721.65$\color{red}{\blacktriangle}$ +0.3738/126
agentless20.3618.82$\color{red}{\blacktriangle}$ +1.5418.82$\color{red}{\blacktriangle}$ +1.5436/122
agentlessCodeCoverage20.4419.99$\color{red}{\blacktriangle}$ +0.4519.99$\color{red}{\blacktriangle}$ +0.4536/121
agentlessLineCoverage30.2029.82$\color{red}{\blacktriangle}$ +0.3829.82$\color{red}{\blacktriangle}$ +0.3835/120

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Test Environment - netflix-zuul

Job Status: 🟢 success

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)
agent86.8887.80$\color{green}{\blacktriangledown}$ -0.9287.80$\color{green}{\blacktriangledown}$ -0.9239/121
agentless79.6081.05$\color{green}{\blacktriangledown}$ -1.4581.05$\color{green}{\blacktriangledown}$ -1.4539/120
agentlessCodeCoverage96.1997.04$\color{green}{\blacktriangledown}$ -0.8595.12$\color{red}{\blacktriangle}$ +1.0739/118
agentlessLineCoverage111.48111.62$\color{green}{\blacktriangledown}$ -0.14111.62$\color{green}{\blacktriangledown}$ -0.1438/117

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7daBot commented Jul 13, 2026

Copy link
Copy Markdown

Test Environment - heliboard

Job Status: 🟢 success

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)
agent-10.319.54$\color{green}{\blacktriangledown}$ -19.859.54$\color{green}{\blacktriangledown}$ -19.8536/43

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:d130935321

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dd-octo-sts

dd-octo-stsBot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

SuiteStatus
Startup🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
ScenarioCandidatemasterΔ (95% CI of mean)
startup:insecure-bank:iast:Agent13.94 s13.97 s[-0.9%; +0.3%] (no difference)
startup:insecure-bank:tracing:Agent13.00 s13.05 s[-1.2%; +0.4%] (no difference)
startup:petclinic:appsec:Agent16.55 s16.83 s[-6.0%; +2.7%] (no difference)
startup:petclinic:iast:Agent16.89 s16.89 s[-0.9%; +0.9%] (no difference)
startup:petclinic:profiling:Agent16.51 s16.45 s[-4.2%; +4.9%] (no difference)
startup:petclinic:sca:Agent16.89 s16.68 s[+0.2%; +2.4%] (maybe worse)
startup:petclinic:tracing:Agent15.91 s16.00 s[-1.7%; +0.5%] (no difference)

Commit:969df18e · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7daBot commented Jul 13, 2026

Copy link
Copy Markdown

Test Environment - jolokia

Job Status: 🟢 success

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)
agent96.8295.12$\color{red}{\blacktriangle}$ +1.7093.23$\color{red}{\blacktriangle}$ +3.5942/129
agentless91.1389.58$\color{red}{\blacktriangle}$ +1.5589.58$\color{red}{\blacktriangle}$ +1.5541/126
agentlessCodeCoverage100.9299.00$\color{red}{\blacktriangle}$ +1.9299.00$\color{red}{\blacktriangle}$ +1.9241/124
agentlessLineCoverage100.8799.00$\color{red}{\blacktriangle}$ +1.8799.00$\color{red}{\blacktriangle}$ +1.8739/122

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Test Environment - okhttp

Job Status: 🟢 success

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)
agent21.4819.20$\color{red}{\blacktriangle}$ +2.2819.20$\color{red}{\blacktriangle}$ +2.2840/126
agentless18.4818.82$\color{green}{\blacktriangledown}$ -0.3418.82$\color{green}{\blacktriangledown}$ -0.3438/124
agentlessCodeCoverage21.6322.54$\color{green}{\blacktriangledown}$ -0.9122.09$\color{green}{\blacktriangledown}$ -0.4638/122
agentlessLineCoverage45.0144.48$\color{red}{\blacktriangle}$ +0.5344.48$\color{red}{\blacktriangle}$ +0.5338/127

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7daBot commented Jul 13, 2026

Copy link
Copy Markdown

Test Environment - spring_boot

Job Status: 🟢 success

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)
agent-5.1816.04$\color{green}{\blacktriangledown}$ -21.2216.04$\color{green}{\blacktriangledown}$ -21.2235/115
agentless-10.419.73$\color{green}{\blacktriangledown}$ -20.149.73$\color{green}{\blacktriangledown}$ -20.1435/116
agentlessCodeCoverage-8.2513.67$\color{green}{\blacktriangledown}$ -21.9213.40$\color{green}{\blacktriangledown}$ -21.6536/115
agentlessLineCoverage8.1432.95$\color{green}{\blacktriangledown}$ -24.8132.95$\color{green}{\blacktriangledown}$ -24.8134/114

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@daniel-mohedano
daniel-mohedano marked this pull request as ready for review July 13, 2026 14:36
@daniel-mohedano
daniel-mohedano requested a review from a team as a code ownerJuly 13, 2026 14:36
@daniel-mohedanodaniel-mohedano changed the title Implement execution instrumentation for Karate v2Add execution instrumentation for Karate v2Jul 13, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7daBot commented Jul 13, 2026

Copy link
Copy Markdown

Test Environment - sonar-java

Job Status: 🟢 success

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)
agent-1.759.16$\color{green}{\blacktriangledown}$ -10.9113.13$\color{green}{\blacktriangledown}$ -14.8837/124
agentless0.7612.12$\color{green}{\blacktriangledown}$ -11.3617.03$\color{green}{\blacktriangledown}$ -16.2737/123
agentlessCodeCoverage93.3377.88$\color{red}{\blacktriangle}$ +15.4586.07$\color{red}{\blacktriangle}$ +7.2637/123
agentlessLineCoverage113.17130.99$\color{green}{\blacktriangledown}$ -17.82136.34$\color{green}{\blacktriangledown}$ -23.1736/122

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:d130935321

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@datadog-datadog-us1-proddatadog-datadog-us1-prodBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Datadog Autotest: PASS

More details

All critical Karate v2 API contracts verified against the actual karate-core-2.0.9.jar: ScenarioResult.scenario is private final Scenario (ByteBuddy @Advice.FieldValue access works), StepResult.skipped(Step, long) exists, ScenarioRuntime.getScenario()/getFeatureRuntime() are public, and FeatureResult.addScenarioResult() receives the final retry result via the @Advice.Return(readOnly=false) override. The retry loop's CallDepthThreadLocalMap correctly prevents recursive re-entry while allowing called-scenario advice to pass through harmlessly. No behavioral regressions found.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit d130935 · What is Autotest? · Any feedback? Reach out in #autotest

Base automatically changed from daniel.mohedano/karate-v2-instrumentation to masterJuly 14, 2026 16:48
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot requested review from amarziali and removed request for a teamJuly 14, 2026 16:48
@daniel-mohedano
daniel-mohedanoforce-pushed the daniel.mohedano/karate-v2-execution branch from d130935 to 969df18CompareJuly 15, 2026 09:37
@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Test Environment - sonar-kotlin

Job Status: 🟢 success

ScenarioThis PR (%)7d medianΔ 7d30d medianΔ 30druns (7d/30d)
agent-36.9413.13$\color{green}{\blacktriangledown}$ -50.0712.87$\color{green}{\blacktriangledown}$ -49.8131/115
agentless-37.7011.88$\color{green}{\blacktriangledown}$ -49.5812.12$\color{green}{\blacktriangledown}$ -49.8231/114
agentlessCodeCoverage-35.9715.41$\color{green}{\blacktriangledown}$ -51.3815.11$\color{green}{\blacktriangledown}$ -51.0831/114
agentlessLineCoverage-33.0619.20$\color{green}{\blacktriangledown}$ -52.2619.20$\color{green}{\blacktriangledown}$ -52.2631/115

Baseline: median of @test.tracer_overhead on main (gitlab) over the last 7/30 days, per OSS project & scenario. Δ = this PR − baseline median; red ▲ = more overhead, green ▽ = less overhead than baseline.

@daniel-mohedano

Copy link
Copy Markdown
ContributorAuthor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351Bot commented Jul 15, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-15 10:19:53 UTC ℹ️ Start processing command /merge


2026-07-15 10:20:04 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-07-15 11:35:09 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-07-15 12:33:18 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot merged commit 2708544 into masterJul 15, 2026
584 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854dBot deleted the daniel.mohedano/karate-v2-execution branch July 15, 2026 12:33
@github-actionsgithub-actionsBot added this to the 1.65.0 milestone Jul 15, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: ci visibilityContinuous Integration Visibilitytag: ai generatedLargely based on code generated by an AI or LLMtype: featureEnhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@daniel-mohedano@gnufede