Skip to content

apm-integrations skill: RPC guidance - #12443

Open
jordan-wong wants to merge 4 commits into
masterfrom
skill/build-module-instrumentation-plugin-20260909
Open

jordan-wong wants to merge 4 commits into
masterfrom
skill/build-module-instrumentation-plugin-20260909

Conversation

@jordan-wong

@jordan-wong jordan-wong commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Changes

  • muzzle.md: muzzle {} requires the dd-trace-java.module.instrumentation plugin id in plugins {} — omitting it fails the build with a misleading "Could not find method muzzle()" error.
  • instrumenter-module.md: when rewriting a module, treat its existing file set as a floor — account for every file, not just the ones you're focused on. Libraries with distinct client/server paths (gRPC, Thrift, Dubbo) need separate decorator/component pairs per role.

Source

From the gRPC blind-regen cycle (#12417): a dropped plugin id broke the build, a profiling-hook file was silently omitted during a module rewrite, and client/server spans shared one decorator with no tag differentiation.

Toolkit research context

apm-instrumentation-toolkit Java eval-research: blind-regenerates existing instrumentation to find toolkit-guidance gaps, encodes fixes here. Docs-only.

…quisite for muzzle{}

muzzle.md covered muzzle{} block content extensively but never stated that
the block only exists because of the dd-trace-java.module.instrumentation
plugin id in plugins{}. An agent rewriting a module's build.gradle from
scratch can drop that plugin id and hit "Could not find method muzzle()"
with no guidance pointing at the actual cause.
… rule

Two gaps found from a gRPC generation exercise:

1. When wholesale-rewriting a module, the pre-existing file set needs to
   be treated as a floor to account for, not a suggestion. A file with no
   obvious class overlap with whatever the rewrite is focused on (a
   profiling hook, an edge-case advice class) is exactly the kind that
   never resurfaces once you're deep in a specific rewrite — the fix is
   an explicit enumerate-and-account-for pass, not "be more careful."

2. Libraries with distinct client and server call paths need distinct
   decorator/component pairs per role — sharing one decorator collapses
   the client-vs-server distinction a trace viewer relies on.
@jordan-wong jordan-wong added tag: ai generated Largely based on code generated by an AI or LLM tag: apm integration toolkit Changes generated by DataDog/apm-instrumentation-toolkit as part of IDM AIT experimentation labels Sep 9, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 9, 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 14.78 s 14.70 s [-0.1%; +1.2%] (no difference)
startup:insecure-bank:tracing:Agent 13.72 s 13.72 s [-0.9%; +0.9%] (no difference)
startup:petclinic:appsec:Agent 17.52 s 17.32 s [+0.4%; +1.9%] (maybe worse)
startup:petclinic:iast:Agent 16.94 s 17.53 s [-7.5%; +0.7%] (no difference)
startup:petclinic:profiling:Agent 17.39 s 17.14 s [+0.4%; +2.6%] (maybe worse)
startup:petclinic:sca:Agent 17.54 s 16.74 s [+0.6%; +9.0%] (maybe worse)
startup:petclinic:tracing:Agent 16.57 s 16.61 s [-1.3%; +0.9%] (no difference)

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

@datadog-datadog-prod-us1

This comment has been minimized.

@jordan-wong
jordan-wong marked this pull request as ready for review September 22, 2026 13:45
@jordan-wong
jordan-wong requested a review from a team as a code owner September 22, 2026 13:45
@jordan-wong
jordan-wong requested review from mcculls and removed request for a team September 22, 2026 13:45
@dd-octo-sts

dd-octo-sts Bot commented Sep 22, 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 commented Sep 22, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-22T13:51:53.202656Z 56aa292 Draft marked ready
🔒 Security Review Completed 2026-09-22T13:53:07.554866Z 56aa292 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 56aa292de5

ℹ️ 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".

Comment thread .agents/skills/apm-integrations/references/muzzle.md Outdated

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot 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.

Bits Code Review: PASS

More details

The new guidance matches repository behavior for the Gradle muzzle plugin, module file preservation, and separate RPC client and server tags.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 56aa292 · @DataDog review to ask questions

dd-trace-java.muzzle is the plugin that actually registers the muzzle{}
DSL extension, not dd-trace-java.module.instrumentation. The parent
dd-java-agent/instrumentation/build.gradle applies dd-trace-java.muzzle
on behalf of any subproject that applies module.instrumentation, so
module.instrumentation is the correct plugin id to add to an
instrumentation module's build.gradle, but the doc was wrong about it
being the one that registers the block directly.
Empty commit to re-run the pipeline after a flaky muzzle shard failure
unrelated to this PR's docs-only content (master's HEAD showed the same
failure at the same time).
@jordan-wong jordan-wong changed the title apm-integrations skill: muzzle plugin prerequisite, module-rewrite floor, RPC client/server tags apm-integrations skill: RPC guidance Sep 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: grpc gRPC instrumentation tag: ai generated Largely based on code generated by an AI or LLM tag: apm integration toolkit Changes generated by DataDog/apm-instrumentation-toolkit as part of IDM AIT experimentation type: documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants