Repository navigation
Register Data Jobs Monitoring tags on Spark span types (tag registry rollout) - #13191
Conversation
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e9f32017c
ℹ️ 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".
There was a problem hiding this comment.
Databricks SQL spans set three Databricks IDs and config.spark_version, but their new registry definition omits all four. This leaves the resolved tag set and co-occurrence model incomplete; existing string-based tagging remains unaffected.
🤖 Bits Code Review · Commit 4e9f320
DJM is Java only, so its span types go in the Java overlay: an abstract spark / spark.task_metrics / spark.aggregate chain, the driver's application, sql, job, stage, streaming batch and task spans, the executor's task span, the launcher span, and a databricks mixin for the top-level span on Databricks. Name patterns (config.*, spark.source.N.*, spark.state.N.*, copied runtime tags) stay unregistered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Databricks a SQL execution can be the top-level span, and getOrCreateSqlSpan adds the Databricks ids and config.spark_version to it, as it does for jobs and streaming batches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With ids bare, service_name's id would be SERVICE_NAME, which is service's name constant, so generation fails on the clash. Its constants are SPARK_SERVICE_NAME / SPARK_SERVICE_NAME_NAME instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
40b70f1 to
6a7fbde
Compare
bric3
left a comment
There was a problem hiding this comment.
No blocking findings. The registry preserves Spark's existing tag names.
- Downstream naming contracts:
databricks_job_id,databricks_job_run_idanddatabricks_task_run_idmatch the exact keys exempted from credit-card obfuscation in the Agent and libdatadog. - Names with different meanings: Spark's
service_nameremains separate fromserviceand its OpenTelemetry nameservice.name.SPARK_SERVICE_NAMEchanges only the generated Java identifier. Existing spellings, includingspark.query_planing_duration, are preserved. - Shared product conventions: Python's Ray instrumentation also sets
_dd.djm.enabled = 1, so the Java-only statement should refer specifically to these Spark span types. The inline wording suggestion is non-blocking.
…claim Only stage metrics take tasks' values into their histograms; the job, application and streaming batch spans sum their stages' metrics without merging the histograms, so those six tags only ever appear on stages. Python's Ray instrumentation also sets _dd.djm.enabled, so the comment now says these Spark spans come from the Java tracer, not that DJM is Java only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/merge |
|
View all feedbacks in Devflow UI.
It will be processed automatically as soon as GitHub reports it as mergeable. View in MergeQueue UI.
The expected merge time in
|
There was a problem hiding this comment.
More details
The Spark tag registrations preserve existing emitted names, and static checks confirmed unique generated constant names and valid slot assignments.
🤖 Bits Code Review · Commit 0954bf2
What Does This Do
Registers the tags Data Jobs Monitoring sets on Spark spans in the tag registry, so the Spark instrumentation can later set them by id. These are the largest group of tags that are set as string literals and aren't registered: 99 of 155 such keys, and 138 of 221 call sites.
DJM is Java only, so everything goes in the Java overlay (
tag-conventions-java.yaml). Each tag is placed on the span types its set sites actually reach:spark(abstract, extendsinternal):app_idandservice_name, set on every driver span bybuildSparkSpan.spark.task_metrics(abstract): the 23 per-task metrics, set by the executor on one task or by the driver as a sum over many (spark.executor_run_time,spark.shuffle_read_bytes, ...).spark.aggregate(abstract): what only the driver's sums carry. That's the task counts,spark.available_executor_time,spark.skew_time, and the base64_dd.spark.*histograms.spark.aggregate:spark.application: app name, user, OpenLineage parent, EMR step,config.spark_version/config.spark_serializer.spark.sqlspark.jobspark.stage: includes the stage's SQL plan.spark.streaming_batch: streaming query ids and progress metrics.spark.task(the driver's view of a finished task) andspark.executor.task(the executor's span). They sharetask_id,stage_idand so on byref.spark.launcher: theSparkLauncherlaunch span.databricksmixin, applied tospark.jobandspark.streaming_batch: the Databricks job, job-run and task-run ids. On Databricks the top-level span is a job or a streaming batch, because there's no application span. This is the overlay's first mixin.Motivation
The id migration needs every tag registered. The registry already covers every tag constant. String literals are the next layer, and DJM's are about two thirds of them.
Additional Notes
config.*job and app parameters (two fixed members,config.spark_versionandconfig.spark_serializer, are registered, following thehttp.request.headers.*precedent)spark.source.<n>.*andspark.state.<n>.*config.*SLOT_COUNTstays at 63.spark.applicationandspark.streaming_batchexceed 63 tags, so some of theiroptionaltags share slots (21 new sharers). Every other Spark type, and every APM span type, stays exact.java_namesentry. With Name KnownTags ids after their tags and fail on constant clashes (tag registry rollout) #13061's bare ids,service_name's id would beSERVICE_NAME, which isservice's name constant, so generation fails on the clash. It gets the baseSPARK_SERVICE_NAMEinstead (idSPARK_SERVICE_NAME, nameSPARK_SERVICE_NAME_NAME). No existing constant changes.KnownTagsTest,TagConstantsRegistryCoverageTest,KnownTagCodecSlotTest, and theTagMapby-id tests pass locally.🤖 Generated with Claude Code