-
Couldn't load subscription status.
- Fork 150
Add performance, testing, logging, Azure Functions, and glossary to AGENTS.md
#7609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
AGENTS.mdAGENTS.md
AGENTS.mdAGENTS.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you write these or did AI write these?
Also curious, was this testable somehow to see whether or not the changes here improved the output that the model gives?
Not really blockers just me wondering how these work 😅
Good question. I had Claude Code (the cli tool) write them based on work across several sessions. I asked it to keep track of all the changes we were making and why into a file, especially if it generated code and I asked for specific changes, like "do it again but change XYZ to avoid heap allocations." Later I asked it to summarize that into guidelines and add them to
I did #7602 yesterday and I also I did more coding work after adding the guidelines in this PR locally, and it does help. For example, when reviewing my changes to the managed loader it is focusing more on performance than it did before. When generating code it is following the new C# syntax suggestion. Also after #7602 is now using our PR template to update my PR descriptions (it generating the description for this PR).
No, I get it. It's all new. So far I only used AI for auto-complete in the IDE, but I started playing with agents recently and I think I'm finally "getting" it. I've enjoyed having Claude Code in a terminal while I work. It's more like pair programming. I write some code and ask AI to review it, or I ask it to generate some code and I review that. It goes both ways 😝 |
AGENTS.mdAGENTS.md
c72a65d to
d2634eb
Compare
This comment has been minimized.
This comment has been minimized.
AGENTS.mdAGENTS.md
…Code Paths" subsection
…generated based on recent work)
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The noop pipeline's path detection uses simple `StartsWith()` matching, not glob patterns. Changed `**/CLAUDE.md` to `.claude/` prefix and added other dev/docs paths that should skip CI. Added exclusions: - `.claude/` (instead of `**/CLAUDE.md` glob) - `.devcontainer/` (dev container config) - `.vscode/` (IDE settings) - `LICENSE`, `NOTICE` (license files) This ensures PRs that only modify documentation or dev settings trigger the noop pipeline instead of the full CI build. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Changed from "Read @../AGENTS.md for more details on this repository." to "See @../AGENTS.md" for brevity while maintaining clarity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
df7f22b to
e7d1e19
Compare
- Add Development & Testing subsection with reference to docs/development/AzureFunctions.md - Document Datadog.Serverless.Compat dependency and agent startup mechanisms - Add Glossary section with common acronyms (AAS, APM, ASM, CI, DBM, DSM, IAST, OTEL, RCM, RASP, WAF)
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7609) - mean (80ms) : 75, 84
. : milestone, 80,
master - mean (80ms) : 77, 84
. : milestone, 80,
section Baseline
This PR (7609) - mean (75ms) : 71, 79
. : milestone, 75,
master - mean (75ms) : 71, 79
. : milestone, 75,
section CallTarget+Inlining+NGEN
This PR (7609) - mean (1,110ms) : 1048, 1172
. : milestone, 1110,
master - mean (1,122ms) : 1058, 1186
. : milestone, 1122,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7609) - mean (119ms) : 114, 125
. : milestone, 119,
master - mean (120ms) : 114, 125
. : milestone, 120,
section Baseline
This PR (7609) - mean (118ms) : 114, 123
. : milestone, 118,
master - mean (119ms) : 115, 123
. : milestone, 119,
section CallTarget+Inlining+NGEN
This PR (7609) - mean (792ms) : 766, 818
. : milestone, 792,
master - mean (802ms) : 782, 821
. : milestone, 802,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7609) - mean (112ms) : 108, 117
. : milestone, 112,
master - mean (114ms) : 109, 119
. : milestone, 114,
section Baseline
This PR (7609) - mean (111ms) : 106, 117
. : milestone, 111,
master - mean (113ms) : 107, 118
. : milestone, 113,
section CallTarget+Inlining+NGEN
This PR (7609) - mean (829ms) : 772, 886
. : milestone, 829,
master - mean (838ms) : 778, 898
. : milestone, 838,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7609) - mean (104ms) : 99, 109
. : milestone, 104,
master - mean (104ms) : 99, 109
. : milestone, 104,
section Baseline
This PR (7609) - mean (103ms) : 98, 108
. : milestone, 103,
master - mean (103ms) : 98, 108
. : milestone, 103,
section CallTarget+Inlining+NGEN
This PR (7609) - mean (708ms) : 687, 730
. : milestone, 708,
master - mean (722ms) : 698, 745
. : milestone, 722,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7609) - mean (201ms) : 198, 204
. : milestone, 201,
master - mean (202ms) : 198, 207
. : milestone, 202,
section Baseline
This PR (7609) - mean (199ms) : 194, 204
. : milestone, 199,
master - mean (200ms) : 193, 206
. : milestone, 200,
section CallTarget+Inlining+NGEN
This PR (7609) - mean (1,186ms) : 1119, 1252
. : milestone, 1186,
master - mean (1,213ms) : 1145, 1282
. : milestone, 1213,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7609) - mean (286ms) : 280, 292
. : milestone, 286,
master - mean (296ms) : 284, 308
. : milestone, 296,
section Baseline
This PR (7609) - mean (284ms) : 278, 290
. : milestone, 284,
master - mean (288ms) : 281, 295
. : milestone, 288,
section CallTarget+Inlining+NGEN
This PR (7609) - mean (954ms) : 911, 997
. : milestone, 954,
master - mean (981ms) : 938, 1024
. : milestone, 981,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7609) - mean (288ms) : 284, 292
. : milestone, 288,
master - mean (299ms) : 288, 310
. : milestone, 299,
section Baseline
This PR (7609) - mean (291ms) : 281, 302
. : milestone, 291,
master - mean (301ms) : 288, 314
. : milestone, 301,
section CallTarget+Inlining+NGEN
This PR (7609) - mean (1,016ms) : 975, 1057
. : milestone, 1016,
master - mean (1,053ms) : 993, 1114
. : milestone, 1053,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7609) - mean (278ms) : 273, 284
. : milestone, 278,
master - mean (295ms) : 285, 304
. : milestone, 295,
section Baseline
This PR (7609) - mean (281ms) : 271, 290
. : milestone, 281,
master - mean (291ms) : 284, 299
. : milestone, 291,
section CallTarget+Inlining+NGEN
This PR (7609) - mean (865ms) : 839, 890
. : milestone, 865,
master - mean (888ms) : 850, 926
. : milestone, 888,
|
## Summary of changes - Add performance optimization patterns, testing guidelines, and logging guidelines to `AGENTS.md`. - Bonus: Fix noop pipeline path exclusions to properly skip CI for documentation-only PRs. ## Reason for change **Documentation:** Document reusable patterns that apply broadly across the tracer codebase: - Performance patterns for startup code and hot paths (from PR #7594) - Testing patterns for testability and isolation (from PR #7594) - Logging terminology to avoid customer confusion (from PR #7467) **CI Optimization:** The noop pipeline was not triggering for documentation-only PRs because it uses `StartsWith()` matching, not glob patterns. The `**/CLAUDE.md` pattern never matched `.claude/CLAUDE.md`. ## Implementation details **New documentation sections:** - Performance Guidelines: Identifies performance-critical code paths (bootstrap/startup and hot paths) - Performance Optimization Patterns: Zero-allocation structs, logging best practices, avoiding params arrays - Testing Patterns: Abstraction-for-testability with examples - Logging Guidelines: Consistent customer-facing terminology (Datadog SDK, Instrumentation, Continuous Profiler, Datadog.Trace.dll) **Pipeline fixes:** - Changed `**/CLAUDE.md` glob to `.claude/` prefix (compatible with `StartsWith()`) - Added `.devcontainer/`, `.vscode/`, `LICENSE`, `NOTICE` to exclusions **Other changes:** - Fixed `.claude/CLAUDE.md` relative path reference - Improved formatting in Coding Style section ## Test coverage N/A - documentation and CI configuration only --------- Co-authored-by: Claude <[email protected]>
Summary of changes
AGENTS.md.Reason for change
Documentation: Document reusable patterns that apply broadly across the tracer codebase:
CI Optimization: The noop pipeline was not triggering for documentation-only PRs because it uses
StartsWith()matching, not glob patterns. The**/CLAUDE.mdpattern never matched.claude/CLAUDE.md.Implementation details
New documentation sections:
Pipeline fixes:
**/CLAUDE.mdglob to.claude/prefix (compatible withStartsWith()).devcontainer/,.vscode/,LICENSE,NOTICEto exclusionsOther changes:
.claude/CLAUDE.mdrelative path referenceTest coverage
N/A - documentation and CI configuration only