Skip to content

inject ol_env into ol spark run tags#11786

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
ansha/ol-env
Jul 7, 2026
Merged

inject ol_env into ol spark run tags#11786
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
ansha/ol-env

Conversation

@ajyu

@ajyu ajyu commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Fixes DET-109

Adds _dd.ol_env:<env> to the spark.openlineage.run.tags set in
setupOpenLineage, alongside the existing _dd.ol_service / _dd.ol_app_id.
The value comes from Config.get().getEnv(), and the tag is omitted when env
is empty.

Motivation

Downstream (dd-source lineage-processor) uses the run environment as the
Spark application UGP node's namespace. A node's entity_id is
hash(name, type, namespace); today the OpenLineage path and the tracer-only
path (djm-span-processor) derive namespace differently, so the same Spark
application resolves to two different entities. Carrying env here lets both
paths key the namespace off the same value (env) and converge on one
entity_id. _dd.ol_service already aligns name; this aligns namespace.

When env is unset the tag is omitted so the consumer falls back to the
OpenLineage namespace (no empty-namespace).

Additional Notes

  • Consumer side
  • Existing setupOpenLineage tests assert via .contains(...), so the new tag
    doesn't affect them; added a test asserting _dd.ol_env:<env> is present when
    dd.env is set.

@ajyu ajyu changed the title [do][job] inject ol_env into ol spark run tags [DET-109][job] inject ol_env into ol spark run tags Jun 29, 2026
@ajyu ajyu changed the title [DET-109][job] inject ol_env into ol spark run tags [DET-109][jobs] inject ol_env into ol spark run tags Jun 29, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
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
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.97 s 13.98 s [-0.8%; +0.7%] (no difference)
startup:insecure-bank:tracing:Agent 12.95 s 13.02 s [-1.4%; +0.4%] (no difference)
startup:petclinic:appsec:Agent 16.97 s 16.61 s [+1.2%; +3.2%] (significantly worse)
startup:petclinic:iast:Agent 16.90 s 16.98 s [-1.3%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 16.86 s 16.74 s [-0.5%; +2.0%] (no difference)
startup:petclinic:sca:Agent 17.00 s 16.75 s [+0.6%; +2.4%] (maybe worse)
startup:petclinic:tracing:Agent 16.10 s 16.38 s [-2.7%; -0.7%] (maybe better)

Commit: cb82b0ca · 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.

@ajyu
ajyu marked this pull request as ready for review July 6, 2026 18:06
@ajyu
ajyu requested a review from a team as a code owner July 6, 2026 18:06
@dd-octo-sts

dd-octo-sts Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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: 1f3eb913d9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

.contains("_dd.ol_service:databricks.job-cluster.some-run-name")
}

def "test setupOpenLineage sets ol_env from dd.env"() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Move the new coverage out of Groovy

AGENTS.md for this tree explicitly says not to write new Groovy / Spock tests and to migrate touched Groovy tests to JUnit 5. This added Spock test extends AbstractSparkListenerTest.groovy, so the new coverage violates the repository's test policy; please add this coverage in JUnit 5 or migrate the touched test instead.

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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

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

@ajyu ajyu changed the title [DET-109][jobs] inject ol_env into ol spark run tags inject ol_env into ol spark run tags Jul 6, 2026
@ajyu ajyu added inst: apache spark Apache Spark instrumentation type: feature Enhancements and improvements labels Jul 6, 2026
@ajyu

ajyu commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jul 7, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-07 13:29:21 UTC ℹ️ Start processing command /merge


2026-07-07 13:29:25 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-07-07 14:26:58 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 7762aca into master Jul 7, 2026
591 of 596 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the ansha/ol-env branch July 7, 2026 14:26
@github-actions github-actions Bot added this to the 1.64.0 milestone Jul 7, 2026
kaahos pushed a commit that referenced this pull request Jul 8, 2026
[do][job] inject ol_env into ol spark run tags

move new test to JUnit 5

Co-authored-by: ansha.yu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: apache spark Apache Spark instrumentation type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants