Logging Patterns
decebals/claude-code-java
Java logging best practices with SLF4J, structured logging (JSON), and MDC for request tracing.
Diagnose and fix scope or continuation lifecycle failures in dd-trace-java instrumentation tests.
$ npx skills add DataDog/dd-trace-java --skill fix-continuation-leakage -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install DataDog/dd-trace-java fix-continuation-leakage --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/DataDog/dd-trace-java.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/fix-continuation-leakage .claude/skills/fix-continuation-leakage && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "fix-continuation-leakage" agent skill from https://github.com/DataDog/dd-trace-java/tree/master/.agents/skills/fix-continuation-leakage into .claude/skills/fix-continuation-leakage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fix-continuation-leakage", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/DataDog/dd-trace-java/tree/master/.agents/skills/fix-continuation-leakageType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add DataDog/dd-trace-java --skill fix-continuation-leakage -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install DataDog/dd-trace-java fix-continuation-leakage --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-java.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/fix-continuation-leakage .agents/skills/fix-continuation-leakage && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "fix-continuation-leakage" agent skill from https://github.com/DataDog/dd-trace-java/tree/master/.agents/skills/fix-continuation-leakage into .agents/skills/fix-continuation-leakage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fix-continuation-leakage", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DataDog/dd-trace-java --skill fix-continuation-leakage -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install DataDog/dd-trace-java fix-continuation-leakage --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-java.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/fix-continuation-leakage .cursor/skills/fix-continuation-leakage && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "fix-continuation-leakage" agent skill from https://github.com/DataDog/dd-trace-java/tree/master/.agents/skills/fix-continuation-leakage into .cursor/skills/fix-continuation-leakage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fix-continuation-leakage", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/DataDog/dd-trace-java.git --path .agents/skills/fix-continuation-leakage--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add DataDog/dd-trace-java --skill fix-continuation-leakage -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install DataDog/dd-trace-java fix-continuation-leakage --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-java.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/fix-continuation-leakage .gemini/skills/fix-continuation-leakage && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "fix-continuation-leakage" agent skill from https://github.com/DataDog/dd-trace-java/tree/master/.agents/skills/fix-continuation-leakage into .gemini/skills/fix-continuation-leakage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fix-continuation-leakage", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install DataDog/dd-trace-java fix-continuation-leakageInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add DataDog/dd-trace-java --skill fix-continuation-leakage -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-java.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/fix-continuation-leakage .github/skills/fix-continuation-leakage && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "fix-continuation-leakage" agent skill from https://github.com/DataDog/dd-trace-java/tree/master/.agents/skills/fix-continuation-leakage into .github/skills/fix-continuation-leakage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fix-continuation-leakage", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add DataDog/dd-trace-java --skill fix-continuation-leakage -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install DataDog/dd-trace-java fix-continuation-leakage --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/DataDog/dd-trace-java.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/fix-continuation-leakage .opencode/skills/fix-continuation-leakage && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "fix-continuation-leakage" agent skill from https://github.com/DataDog/dd-trace-java/tree/master/.agents/skills/fix-continuation-leakage into .opencode/skills/fix-continuation-leakage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fix-continuation-leakage", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
fix-continuation-leakageDiagnose and fix scope or continuation lifecycle failures in dd-trace-java instrumentation tests.
Fix Continuation Leakage is an agent skill from DataDog/dd-trace-java, published by the product's own GitHub organization. Diagnose and fix scope or continuation lifecycle failures in dd-trace-java instrumentation tests. Use when a test reports a continuation leak, double resolution, activation after resolve, or an unclosed scope. Reads the automatic diagnostic timeline, finds the broken lifecycle edge, fixes it, and explains it with a compact Mermaid diagram.
Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Observability. It works with Java, Datadog and Mermaid. The repository describes itself as: Datadog APM client for Java. The licence is Apache-2.0.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 1c373d5. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashReadEditGlobGrepAskUserQuestionFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Fix Continuation Leakage loads about 1.6k tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 803 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Bash, Read, Edit, Glob, Grep, AskUserQuestionAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from DataDog/dd-trace-java at commit 1c373d5, republished under its Apache-2.0 licence (© DataDog). 803 words, ~1,624 tokens.
.claude/skills/fix-continuation-leakage/SKILL.md (or your agent's skills folder).Instrumentation tests run the diagnostic automatically. A failure includes the capture, resume, resolution, scope, thread, timing, and callsite data needed to find the missing lifecycle edge.
netty:netty-4.1 versus kotlin-coroutines-1.3). Use forkedTest for
*ForkedTest* classes, or the suite-specific forked task such as latestDepForkedTest.
Run the smallest failing test with full output:set -o pipefail
./gradlew :dd-java-agent:instrumentation:<module-path>:<test-task> --tests '<FQCN-or-pattern>' --info 2>&1 | tee /tmp/scopediag-run.txtScope/continuation timeline in the output. If Gradle hides it, inspect the test XML's
<system-out> under the module's build/test-results directory.LEAKED / NEVER_CLOSED: find the success, error, cancellation, and rejection exits that
skipped release() or close().DOUBLE_FINISH: find two owners of the same cleanup.ACTIVATE_AFTER_RESOLVE: find work scheduled after ownership ended.LATE_FINISH / CLOSE_WRONG_THREAD: advisory evidence; verify whether ordering is valid.[deferred-cleanup]: a root iteration scope transferred cleanup to the bounded iteration
cleaner. It may remain open at the test boundary and is not a leak. Do not generalize this to
other ITERATION scopes; an unregistered iteration scope must still close normally.knownMatchingTypes() when shortcut matching is used.
Check static initialization (<clinit>): first use under an active request can capture its
context in singleton tasks, including shaded Netty GlobalEventExecutor sentinels. Reproduce
first use in a fresh JVM; prewarming can hide the bug. Do not suppress all class initializers.finally; do not ignore every swap.try/finally cleanup across every exit.Automatic recording covers Spock setupSpec() / cleanupSpec() and JUnit @BeforeAll /
@AfterAll, in addition to per-test setup and cleanup. The failure output identifies whether the
problem belongs to suite setup, one test, or suite cleanup. Code that runs before the
instrumentation-test harness initializes the tracer remains outside this window.
Apply process-wide configuration before starting servers, actor systems, executors, or other long-lived fixtures. Use a forked test or recreate the fixture when its static state cannot be reset safely.
Instrumentation tests always use strict trace writes; there is no harness opt-out. Do not replace the harness tracer or add a new escape hatch to weaken that invariant.
Fix the continuation lifecycle when possible. If it cannot be fixed in the current change,
quarantine the test with @Flaky and a useful reason or tracked issue instead of weakening strict
trace writes. Keep continuation tracking enabled so the failure remains diagnosable.
Use @TrackScopeContinuations(enabled = false, reason = "...") only when the diagnostic itself is
incompatible with the test, not when it has found a real unresolved leak. Scope the opt-out as
narrowly as possible. The reason must describe the incompatibility and when the opt-out can be
removed; strict trace writes remain enabled.
An unresolved continuation blocks normal reference-count completion, not necessarily publication.
The production PendingTrace buffer can still write finished spans; strict tests remove that
delayed-write fallback, but partial flush remains possible. Do not infer lost traces or a fixed
UI delay from a diagnostic failure. Check the collector and configuration; see
continuation effects.
Memory retention requires a reachable owner of the continuation/context; it does not prove the whole trace remains retained or memory grows without bound. Wrong parentage requires activation of unrelated context or a leaked active scope. Separate the observed lifecycle defect from its possible production effects and from test-only cleanup failures.
Lead with one sentence: what was captured, which cleanup edge was missing, and where. Cite the
timeline callsites. Then include a small Mermaid flowchart LR; use green for healthy edges, red
for the broken edge, and label thread handoffs. Use a Gantt only when timing itself caused the bug.
End with the code fix and the exact tests that passed.
© DataDog, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/fix-continuation-leakage of DataDog/dd-trace-java.
Open the folder on GitHubat commit 1c373d5
Fix Continuation Leakage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Fix Continuation Leakage this skillDataDog/dd-trace-java | 736 | — | ~1.6k | Automated safety check: Notes | Apache-2.0 | |
| Logging Patternsdecebals/claude-code-java | 751 | 1 repos | ~3.3k | Automated safety check: Pass | MIT | |
| Agent Observability Trace Rcadatadog-labs/agent-skills | 177 | — | ~10k | Automated safety check: Pass | MIT | |
| Code To Diagramzebbern/claude-code-guide | 4.7k | — | ~972 | Automated safety check: Pass | MIT | |
| Dt Obs ServicesDynatrace/dynatrace-for-ai | 162 | — | ~3.3k | Automated safety check: Pass | Apache-2.0 | |
| Golang Samber Slogcontext-labs/whip | 1.1k | 2 repos | ~3k | Automated safety check: Pass | MIT |
decebals/claude-code-java
Java logging best practices with SLF4J, structured logging (JSON), and MDC for request tracing.
datadog-labs/agent-skills
Root cause analysis on production LLM traces. An agent skill from datadog-labs/agent-skills.
zebbern/claude-code-guide
Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts.
Dynatrace/dynatrace-for-ai
Service performance monitoring with RED metrics (Rate, Errors, Duration) and runtime-specific telemetry for Java, .NET, Node.js, Python, PHP, and Go.
context-labs/whip
Structured logging extensions for Golang using samber/slog- — multi-handler pipelines, sampling, attribute formatting, HTTP middleware (gin, echo, fiber, chi), backend routing (datadog, sentry…
rongxinzy/RongxinAI
解析代码仓库的 import/依赖关系,自动生成架构图、流程图和组织架构图,输出 Mermaid 文本或 SVG 图片。支持 Python、JavaScript、TypeScript、Go 和 Java 项目。当用户需要可视化代码结构、分析模块依赖、生成架构文档,或提及“代码架构图”、“依赖关系图”、“流程图”、“组织架构图”、“Mermaid 图”等关键词时触发。
DataDog/dd-trace-java
Write a new library instrumentation end-to-end. An agent skill from DataDog/dd-trace-java.
DataDog/dd-trace-java
Performance-overhead review of a code diff / branch / PR for the dd-trace-java tracer.
DataDog/dd-trace-java
Diagnose and resolve dd-trace-java CI failures from a module's muzzle task or the runMuzzle aggregate.
DataDog/dd-trace-java
Review a code diff / branch / PR for technical debt — code duplication, unnecessary complexity / over-engineering, and redundant or dead code.
DataDog/dd-trace-java
Clarify or review Java Javadocs, Javadoc tags, and explanatory code comments for legibility, accuracy, and source alignment.
DataDog/dd-trace-java
Converts Spock/Groovy test files in a Gradle module to equivalent JUnit 5 Java tests.
Categories
Diagnose and fix scope or continuation lifecycle failures in dd-trace-java instrumentation tests. Fix Continuation Leakage is an agent skill from DataDog/dd-trace-java, published by the product's own GitHub organization. Diagnose and fix scope or continuation lifecycle failures in dd-trace-java instrumentation tests.
Fix Continuation Leakage fits situations like: A test reports a continuation leak; double resolution; activation after resolve; an unclosed scope.
Run `npx skills add DataDog/dd-trace-java --skill fix-continuation-leakage -a claude-code`. Or copy the skill folder (.agents/skills/fix-continuation-leakage in DataDog/dd-trace-java) into .claude/skills/fix-continuation-leakage in your project. Claude Code loads it when a task matches its description.
Run `npx skills add DataDog/dd-trace-java --skill fix-continuation-leakage -a codex`. Or copy the skill folder (.agents/skills/fix-continuation-leakage in DataDog/dd-trace-java) into .agents/skills/fix-continuation-leakage in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DataDog/dd-trace-java --skill fix-continuation-leakage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fix-continuation-leakage, .gemini/skills/fix-continuation-leakage, .github/skills/fix-continuation-leakage and .opencode/skills/fix-continuation-leakage in your project.
SKILL.md names no scripts, command-line tools or credentials: Fix Continuation Leakage is instructions for the agent only. Its frontmatter pre-approves these tools: Bash, Read, Edit, Glob, Grep, AskUserQuestion.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Fix Continuation Leakage is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Fix Continuation Leakage: Logging Patterns (decebals/claude-code-java, 751 stars), Agent Observability Trace Rca (datadog-labs/agent-skills, 177 stars), Code To Diagram (zebbern/claude-code-guide, 4.7k stars) and Dt Obs Services (Dynatrace/dynatrace-for-ai, 162 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
DataDog (a GitHub organization, an official publisher) maintains it in DataDog/dd-trace-java, which has 736 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.
Source: DataDog/dd-trace-java on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.