apm-agent-java
Copilot instructions592 starsChanged 12 days agoApache-2.0View on GitHub
This repository contains the Elastic APM Java agent. These instructions apply when reviewing pull requests.
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,336 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
14 rules. About 1 is common, 13 are distinctive, and 0 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Prefer localized fixes over unrelated refactoring.
- Distinctive: line 15
Check compatibility of public APIs, configuration, and emitted telemetry.
- Distinctive: line 17
Check concurrent access, asynchronous context propagation, and lifecycle handling.
- Distinctive: line 18
Check hot-path changes for unnecessary allocations, blocking, or contention.
- Distinctive: line 19
Check resource cleanup and unbounded retention, including class-loader leaks.
- Common: line 20
Check error handling against existing failure-isolation and logging conventions.
- Distinctive: line 21
Check that logs and telemetry do not expose credentials or sensitive data.
- Distinctive: line 25
Look for focused regression tests for changed behavior and relevant edge cases.
- Distinctive: line 26
Check that tests are deterministic and exercise observable behavior.
- Distinctive: line 27
Check documentation when public behavior or configuration changes.
- Distinctive: line 28
Follow existing project conventions without requesting unrelated formatting changes.
- Distinctive: line 32
Check that instrumentation failures do not escape into application code or change application behavior.
- Distinctive: line 33
Check class-loading boundaries between agent and application code.
- Distinctive: line 34
Check that instrumentation matches supported library versions without accidentally instrumenting unsupported versions.
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot instructions
This repository contains the Elastic APM Java agent. These instructions apply when reviewing pull requests.
Review priorities
- Prioritize correctness, compatibility, and operational safety over style.
- Focus findings on problems introduced or exposed by the pull request.
- Explain the concrete failure scenario and user impact of each finding.
- Prefer localized fixes over unrelated refactoring.
Compatibility and runtime behavior
- Check compatibility of public APIs, configuration, and emitted telemetry.
- Preserve supported Java versions and library or framework compatibility.
- Check concurrent access, asynchronous context propagation, and lifecycle handling.
- Check hot-path changes for unnecessary allocations, blocking, or contention.
- Check resource cleanup and unbounded retention, including class-loader leaks.
- Check error handling against existing failure-isolation and logging conventions.
- Check that logs and telemetry do not expose credentials or sensitive data.
Tests and documentation
- Look for focused regression tests for changed behavior and relevant edge cases.
- Check that tests are deterministic and exercise observable behavior.
- Check documentation when public behavior or configuration changes.
- Follow existing project conventions without requesting unrelated formatting changes.
APM Java agent
- Check that instrumentation failures do not escape into application code or change application behavior.
- Check class-loading boundaries between agent and application code.
- Check that instrumentation matches supported library versions without accidentally instrumenting unsupported versions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

