fernandoteixxeira/stark-bank-challenge/cloud-logging-structured-json

Claude Code and agent skill by fernandoteixxeira/stark-bank-challenge

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when logs need to carry severity and structured fields into Google Cloud Logging, when a log-based metric or alert filter matches nothing, when migrating an application from plain-text to JSON logs, or when choosing a JSON encoder for Spring Boot and logback.

Install

npx vskill@latest install fernandoteixxeira/stark-bank-challenge/cloud-logging-structured-json

SKILL.md

The same SKILL.md was published earlier as fernandoteixxeira/stark-bank-challenge/cloud-logging-structured-json.

Structured JSON Logs for Cloud Logging

Emit logs the platform can read as data, and understand what that migration breaks.

Why plain text is not enough

A container writing plain text to stdout has every line ingested at severity DEFAULT. The platform does not parse a leading WARN or ERROR token out of the message — that is formatting, not structure.

The consequence is quiet rather than loud: a log-based metric filtering on severity>=WARNING matches nothing, the alert built on it never fires, and everything looks configured. Nothing errors; a signal simply does not exist. Verify a new filter against real entries before trusting it.

The two fields that decide whether it works

Severity must be `severity`. A level field is ignored, however conventional it looks.

The value must be one the platform's enum defines. It has no WARN and no TRACE; an unrecognised value silently falls back to DEFAULT. Passing logback's level names straight through therefore reproduces the original bug in JSON clothing — the field is populated, the filter still matches nothing. Map before emitting:

Logger levelEmit as
TRACEDEBUG
DEBUGDEBUG
INFOINFO
WARNWARNING
ERRORERROR

Prove the mapping against a real entry rather than assuming the encoder does it.

The migration breaks every existing filter

This is the part most likely to bite later, because it is invisible until something that used to work stops.

Plain-text logs populate textPayload. Structured logs populate jsonPayload and leave textPayload empty. So every filter, metric, alert and saved query matching on textPayload:"..." must become jsonPayload.message:"..." in the same change.

Adding structure while leaving those filters alone breaks them in the opposite direction from before: the severity clause starts working and the message clause stops. Change both together, or the fix and the regression cancel out into the same silence.

Treat log format as a contract with your infrastructure code, not an application detail. If filters live in Terraform, they and the encoder configuration change in one commit.

Choosing an encoder

  • Check first whether the framework has this built in. Recent Spring Boot versions ship structured logging configured by properties; older ones need a logback JSON encoder.
  • A vendor's own logging appender is the obvious-looking choice and is often far heavier than it appears — some pull the vendor's entire API client stack, including gRPC and protobuf, onto every application, for what is purely a stdout formatting concern. Inspect the dependency tree before adopting one.
  • Pin the encoder to a version built against the logback and Jackson the framework already manages, so nothing overrides a managed version.

Practical shape

  • Default to JSON; make plain text the opt-in, typically under a local or test profile. The reverse — JSON behind a flag — means the deployment that forgets the flag is the one whose alerting goes quiet, which is the failure mode you are trying to remove.
  • Put the stack trace in its own field rather than appending it to the message, so a text filter matches the message instead of a wall of frames. Know the trade: some error-grouping features read the trace from the message and will stop grouping. Choose deliberately.
  • MDC contents usually become top-level fields. Do not put secrets or payloads there.
  • Keep the timestamp the encoder emits; the platform stamps its own arrival time, and having both is useful when they disagree.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/fernandoteixxeira/stark-bank-challenge/cloud-logging-structured-json/badge)](https://verified-skill.com/skills/fernandoteixxeira/stark-bank-challenge/cloud-logging-structured-json)

Something wrong with this skill or its page? Tell us.