Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
Back to list

Spring AI Observability

Adds token, cost, latency, and audit-log instrumentation to Spring AI / LLM calls in Spring Boot.

Dev & CodingIntermediate21035AI score 9/10Last updated: Aug 10, 2026

What it does

  • Configures Spring AI 1.0 GA's built-in Micrometer instrumentation (gen_ai.client.token.usage, gen_ai.client.operation) plus Actuator/Prometheus exposure.
  • Supplies MeterRegistry code for custom metrics: prompt latency timers and input/output token counters.
  • Provides a CallAdvisor audit advisor for prompt/response logging, a per-model cost estimator, and an async ai_audit_log persistence pattern.
  • Flags the GA API renames (CallAroundAdvisorCallAdvisor, AdvisedRequestChatClientRequest, getGenerationTokens()getCompletionTokens()) that commonly break generated code.

Who it's for

  • Backend engineers shipping LLM features on Spring Boot 3 + Spring AI.
  • Teams that need token usage and monthly LLM spend on a dashboard.
  • Organizations already running Prometheus/Grafana monitoring.

Examples

  1. "Export ChatClient P95 latency and token usage to Prometheus" → generates Actuator/histogram config and custom Timer/Counter beans.
  2. "Audit-log prompt length and token counts per request" → implements AiAuditAdvisor with async DB persistence.
  3. "Build a per-model cost estimator" → produces AiCostEstimator from a per-1M-token pricing map, with advice to externalize prices to config.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/rrezartprebreza/spring-boot-skills/HEAD/skills/spring-boot-3/ai-observability/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the skills/spring-boot-3/ai-observability folder from the GitHub repo rrezartprebreza/spring-boot-skills into my ~/.claude/skills/ai-observability/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/rrezartprebreza/spring-boot-skills.git && mkdir -p ~/.claude/skills && cp -r spring-boot-skills/skills/spring-boot-3/ai-observability ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal and cd into any working directory.
  2. Clone the repo: git clone https://github.com/rrezartprebreza/spring-boot-skills.git
  3. Create the skills directory if needed: mkdir -p ~/.claude/skills
  4. Copy just this skill: cp -r spring-boot-skills/skills/spring-boot-3/ai-observability ~/.claude/skills/
  5. Run claude inside your project and ask something like "add token cost monitoring to my Spring AI service" to trigger the skill.
  6. Make sure your build includes spring-boot-starter-actuator and micrometer-registry-prometheus, and keep log-prompt: false in production.