✨ Add datadog-sdk-event-inspection skill for Claude Code#4263
✨ Add datadog-sdk-event-inspection skill for Claude Code#4263
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebd1ce9c1e
ℹ️ 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".
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 2cc1269 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
| ```dot | ||
| digraph injection { | ||
| "Need initial view event\nor events from init()?" [shape=diamond]; | ||
| "Path B: CDP pre-load injection" [shape=box]; | ||
| "Path A: Console injection" [shape=box]; | ||
| "Need initial view event\nor events from init()?" -> "Path B: CDP pre-load injection" [label="yes"]; | ||
| "Need initial view event\nor events from init()?" -> "Path A: Console injection" [label="no"]; | ||
| } | ||
| ``` |
There was a problem hiding this comment.
❓ question: can we use mermaid diagram instead? they are commonly rendered in markdown previews
```mermaid
flowchart TD
Q["Need initial view event<br/>or events from init()?"]
Q -- "yes" --> B["Path B: CDP pre-load injection"]
Q -- "no" --> A["Path A: Console injection"]
There was a problem hiding this comment.
Already applied — the mermaid flowchart is in the skill file (commit 279517d).
AGENTS.md
Outdated
| - Use it when you need to confirm a RUM, log, or telemetry event contains the expected fields | ||
| - Use it when unit tests alone are not sufficient to validate serialized event output |
There was a problem hiding this comment.
💭 thought: I found the sandbox useful for reproducing customer escalations. However, if unit test is not enough, then maybe what we want is an e2e test, which is doing the same thing but stays in the repo to prevent regression.
There was a problem hiding this comment.
Good point. Added a note to AGENTS.md: 'this skill is a debugging and spot-check tool, not a regression gate. If you need to prevent regressions, write an E2E test instead (see test/e2e/).' (commit 3ec3534)
| **Never manually edit** files with a `DO NOT MODIFY IT BY HAND` header (e.g., `telemetryEvent.types.ts`). Changes require a PR in the upstream schema repo first, then regeneration. | ||
|
|
||
| ## Commit Messages | ||
| ## Unit Tests |
There was a problem hiding this comment.
🔨 warning: It's missing mention of Jasmine and Karma. Without that Claude used to be confused in test APIs
There was a problem hiding this comment.
Already there — AGENTS.md has - **Test framework**: Jasmine + Karma in the Unit Tests section.
… warning, E2E note
d981a16 to
2cc1269
Compare
Motivation
Adds a Claude Code skill for inspecting Browser SDK event payloads in the sandbox. This provides a reusable, documented workflow for verifying emitted events without relying on network request interception.
Changes
.claude/skills/datadog-sdk-event-inspection/SKILL.md— a skill that guides Claude Code to use thewindow.__ddBrowserSdkExtensionCallbackhook for event inspection, with two injection paths (console post-load vs CDP pre-load for initial view events).Test instructions
Load the skill in a Claude Code session and verify it correctly guides event inspection in the sandbox (
yarn dev→http://localhost:8080).Checklist