Skip to content

feat: tracing skill - #72

Draft
helleengebakken wants to merge 14 commits into
mainfrom
feature/tracing-skill
Draft

feat: tracing skill#72
helleengebakken wants to merge 14 commits into
mainfrom
feature/tracing-skill

Conversation

@helleengebakken

@helleengebakken helleengebakken commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

feat: add setup-tracing skill for OpenTelemetry/Cloud Trace instrumentation

Summary

  • Adds a setup-tracing skill that walks an agent through Entur's tracing golden path: confirm language + that Cloud Trace storage is already enabled (a console-only prerequisite) → Terraform API/IAM → instrument (OpenTelemetry Java Agent for Kotlin/Java, manual OpenTelemetry SDK for Go) → runtime env vars → log/trace correlation → hand off verification to the user (requires a live deploy, which is outside what this skill can do) based on this [How-To Initialise Distributed Tracing](https://entur.atlassian.net/wiki/spaces/ESP/pages/6607110165/How To+Initialise+Distributed+Tracing).
  • Wires it up as an installable plugin (plugins/setup-tracing/, marketplace entry in .claude plugin/marketplace.json) and adds it to the skills/README.md catalogue, matching every other skill in this repo.
  • Adds three comprehension-test scenarios (tests/scenarios/28-30) covering the rules most likely to get silently violated: IAM least privilege (roles/cloudtrace.agent only), Java Agent as the Kotlin/Java default vs. Go's manual SDK, and the single-CMD-per-Dockerfile trap when Cloud Profiler is already wired in.

Test plan

  • cd tests && go run . --dry-run --scenario "*tracing*" — all three scenarios parse correctly, no API calls
  • Manually validated the skill's instructions against a real repo (upload the skill locally via Customize → Skills in Claude Code, no merge required). Only validated against Ditto, need to try on a more advanced repo.
  • npm run lint:md — handled automatically by CI's markdown-lint job on this PR

@helleengebakken helleengebakken self-assigned this Jul 1, 2026
@helleengebakken helleengebakken changed the title Feature/tracing skill feat: tracing skill Jul 1, 2026
@helleengebakken helleengebakken added the enhancement New feature or request label Jul 1, 2026
Helle Engebakken and others added 9 commits July 3, 2026 13:44
Traces land in the shared host project (ent-kub-<env>), and IAM roles
plus required APIs are provisioned automatically via the common Helm
chart -- remove the manual Terraform steps, the Cloud Trace storage
console prerequisite, and the ent-<app>-<env> project references that
contradicted this. Trim runtime env vars to just the sampler, matching
tracing.md, and add its calls-per-minute sampling ratio table.
Scenario 29 read skills/setup-tracing-go/SKILL.md to compare its
behavior against setup-tracing-java, but the Go skill was removed --
the file it depended on no longer exists.
…-path update

- 28-tracing-iam-least-privilege.md tested a manual roles/cloudtrace.agent
  grant that setup-tracing-java no longer performs -- IAM is now
  provisioned automatically via the common Helm chart.
- 17-trace-project-routing.md asserted the old app-project
  (ent-<app>-<env>) trace routing model by reading
  guides/reference/tracing.md directly, which still documents that
  old model on this branch and now contradicts the updated skill.
  Removed rather than updated since the reference doc it depends on
  hasn't been synced yet.
…tighten cloud-logging version check

- Merge tracing agent flags into the existing ENTRYPOINT instead of
  assuming a CMD-based single-jar launch -- Entur's Docker golden path
  (docker.md) always launches the JVM via ENTRYPOINT, for both the
  preferred layered-JAR pattern and the single-jar Alpine alternative.
- Require entur/cloud-logging v7.1.0+ explicitly (earlier versions don't
  inject trace/span fields), and add the missing unhappy path: point to
  logging.md when cloud-logging is missing or too old, and flag the
  Spring Boot 4.1.x dependency that comes with it.
- Tighten the skill's scope to Spring Boot specifically, with an
  explicit check before proceeding, since the rest of the skill (log
  correlation) only works for Spring Boot services.
- Link the Cloud Profiler critical rule to profiler.md instead of
  leaving it as a dangling reference.
- Update test scenario 30 to match the ENTRYPOINT-based guidance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant