Skip to main content
skill CX Codex

183-java-observability-tracing-opentelemetry — Claude Code skill

183-java-observability-tracing-opentelemetry guides OpenTelemetry distributed tracing setup in Java services with context propagation and semantic attributes.

Apache-2.0 253 installs ★ 465 updated 2026-10-21

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jabrena/plinth --skill 183-java-observability-tracing-opentelemetry -a claude-code
Open on GitHub

What 183-java-observability-tracing-opentelemetry does

This skill guides the implementation of OpenTelemetry distributed tracing across Java codebases. It structures span hierarchies, enforces semantic convention naming, and ensures trace context crosses HTTP boundaries, messaging systems, and asynchronous thread executors without breaking.

The workflow covers four distinct phases: mapping trace boundaries, instrumenting propagation paths, sanitizing span metadata, and validating spans end-to-end. It emphasizes data privacy by preventing raw payloads, authorization tokens, or sensitive credentials from entering telemetry events.

Instrumentation changes require running ./mvnw clean verify or mvn clean verify to ensure tests pass and tracing additions introduce no regressions.

What it helps with

  • propagate trace context across threads, HTTP calls, and message brokers
  • instrument Java application flows using OpenTelemetry semantic conventions
  • strip credentials and high-cardinality values from span attributes
  • balance sampling rules against telemetry storage overhead

Example prompts for the agent

  • Instrument our payment processing service with OpenTelemetry spans and context propagation
  • Refactor HTTP client tracing to align with OpenTelemetry semantic conventions
  • Audit current span attributes to remove sensitive data and payload dumps

How to install 183-java-observability-tracing-opentelemetry

1Skills CLI (Vercel)

npx skills add jabrena/plinth --skill 183-java-observability-tracing-opentelemetry -a claude-code

2Manually: put the files in place

~/.claude/skills/183-java-observability-tracing-opentelemetry/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/183-java-observability-tracing-opentelemetry/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about 183-java-observability-tracing-opentelemetry

How to install 183-java-observability-tracing-opentelemetry in Claude Code?

Run npx skills add jabrena/plinth --skill 183-java-observability-tracing-opentelemetry -a claude-code.

What is the purpose of this skill?

It guides coding agents to implement distributed tracing in Java using OpenTelemetry standards, proper span modeling, and safe context propagation.

Which command verifies tracing instrumentation changes?

Run ./mvnw clean verify or mvn clean verify directly in the project root.

Source text

SKILL.md · Apache-2.0
---
name: 183-java-observability-tracing-opentelemetry
description: Use when you need to implement or improve distributed tracing with OpenTelemetry in Java — including trace/span modeling, context propagation, semantic conventions, span attributes/events/status, sampling strategy, baggage usage, privacy safeguards, and backend integration with OTLP collectors. This should trigger for requests such as Improve tracing; Apply OpenTelemetry tracing; Add distributed tracing; Refactor tracing instrumentation; Instrument Java services with OpenTelemetry spans. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Java Distributed Tracing with OpenTelemetry

Implement robust distributed tracing in Java with OpenTelemetry by modeling meaningful spans, preserving context propagation, and instrumenting critical business and infrastructure paths with low-overhead, privacy-safe telemetry.

**What is covered in this Skill?**

- OpenTelemetry tracing fundamentals for Java services
- Span design: boundaries, parent/child relationships, and operation naming
- Context propagation across HTTP, messaging, async tasks, and thread boundaries
- Semantic conventions and stable attribute naming
- Error/status/event recording best practices
- Sampling strategy and performance/cost trade-offs
- Privacy and security controls for trace attributes
- Testing and verification of trace propagation and span correctness

**Scope:** Distributed tracing quality in application and integration layers, focused on diagnosability, consistency, and operational safety.

## Constraints

Tracing instrumentation must preserve context correctly and avoid leaking sensitive data. Over-instrumentation and high-cardinality attributes can harm cost and signal quality.

- **PROPAGATION FIRST**: Ensure context propagation across all sync/async boundaries before adding extra span detail
- **NO SENSITIVE DATA**: Never store secrets, credentials, tokens, raw payloads, or PII in span attributes/events
- **LOW CARDINALITY ATTRIBUTES**: Avoid unbounded values in attributes that are used for aggregation/search
- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying tracing changes

## When to use this skill

- Improve tracing
- Apply OpenTelemetry tracing
- Add distributed tracing
- Refactor tracing instrumentation
- Instrument Java services with OpenTelemetry spans

## Workflow

1. **Define trace model and critical flows**

Identify high-value request and async flows, define operation boundaries, and choose span names/attributes aligned with semantic conventions.

2. **Instrument and propagate context**

Add OpenTelemetry spans to key boundaries and ensure trace context is propagated across HTTP clients/servers, messaging, and executor-based async work.

3. **Harden span data and sampling**

Record status/errors/events consistently, remove sensitive data, control attribute cardinality, and configure sampling/exporters according to environment needs.

4. **Validate traces end-to-end**

Verify parent-child relationships, propagation continuity, and backend visibility through tests and runtime checks.

## Reference

For detailed guidance, examples, and constraints, see [references/183-java-observability-tracing-opentelemetry.md](references/183-java-observability-tracing-opentelemetry.md).

© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth

Similar skills

All skills for Backend and APIs →

From the same set123

The whole set →
415-frameworks-quarkus-mongodb Skill for MongoDB in Quarkus projects: Panache entities and repositories, document design, indexes, transactions, and error handling. Triggers on requests to add MongoDB, review architecture, and optimize data access patterns. CX Codex +1 279installs 514-frameworks-micronaut-kafka 514-frameworks-micronaut-kafka guides Kafka messaging setup in Micronaut applications. Covers producers, consumers, SerDes configuration, retry handling, and integration tests. CX Codex +1 275installs 515-frameworks-micronaut-mongodb The 515-frameworks-micronaut-mongodb skill guides MongoDB work in Micronaut, from document models and repositories to indexes and error handling. Use it when adding or reviewing persistence. CX Codex +1 272installs 123-java-design-patterns The 123-java-design-patterns skill helps choose, review, and apply Java patterns for APIs, Kafka, persistence, and integrations. CX Codex +1 267installs 305-frameworks-spring-boot-modulith 305-frameworks-spring-boot-modulith guides Spring Modulith work in Spring Boot modular monoliths, from module boundaries to events and tests. Use it when reviewing or reshaping the architecture. CX Codex +1 245installs 704-technologies-sql The 704-technologies-sql skill guides schema design, SQL queries, indexes, and migrations without tying the advice to a Java framework. Use it for database reviews and changes. CX Codex +1 227installs 300-frameworks-spring-boot-create-project 300-frameworks-spring-boot-create-project scaffolds Maven-based Spring Boot 4.0.x projects using Java 25 and SDKMAN tools. Useful when starting new backend services with automated build verification. CX Codex +1 225installs 706-technologies-containers-docker 706-technologies-containers-docker is a Claude Code skill for reviewing Java Dockerfiles, Maven image builds, jlink runtimes, and container security. CX Codex +1 225installs

Project sponsors

Companies that keep this analytics open