Skip to content

docs(openspec): propose observability diagnostics for node-vtex-api@6.x - #710

Open
juliobguedes wants to merge 2 commits into
6.xfrom
feature/add-observability-to-6x-openspec
Open

juliobguedes wants to merge 2 commits into
6.xfrom
feature/add-observability-to-6x-openspec

Conversation

@juliobguedes

Copy link
Copy Markdown
Contributor

Summary

  • Adds an OpenSpec change (add-observability-to-6x) proposing the backport of DiagnosticsMetrics and the split traces/metrics/logs telemetry client from master (7.x) to node-vtex-api@6.x.
  • Documents the dependency audit that removes the original blocker: the diagnostics/OpenTelemetry package tree's highest engines.node floor is >=14, well within the node: 6.x builder runtime (Node 16.20.2). No builder-hub/service-runtime-node changes are required.
  • Specs and tasks are written for TDD/BDD: every requirement has Given/When/Then scenarios, and tasks are grouped as red → green → refactor cycles traceable back to those scenarios.
  • No implementation code changes in this PR — planning artifacts only (proposal.md, design.md, specs/diagnostics-metrics/spec.md, tasks.md).

Test plan

  • openspec validate --changes add-observability-to-6x passes (already run locally)
  • Team review of proposal/design/specs before implementation starts on the 6.x branch
  • Actual implementation + test suite will be covered in a follow-up PR against the 6.x branch

🤖 Generated with Claude Code

@sonar-workflows

Copy link
Copy Markdown

Failed Quality Gate failed

  • 1 New Issues (is greater than 0)

Project ID: node-vtex-api

View in SonarQube

@dk-pr-review dk-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DK Review — Deferred (Sonar gate)

⏭️ LLM review not run: this PR's Sonar quality gate is currently failing.

DK Review holds the AI review until Sonar passes, so review budget is not spent on a PR that already needs changes. Fix the issues Sonar reported and push again — the full review runs automatically once Sonar is green.

This PR is not blocked by DK Review; a human engineer can still approve and merge manually.

DK Review v1.0.0

Adds an OpenSpec change (proposal, design, TDD/BDD specs, and tasks) for
backporting DiagnosticsMetrics and the split traces/metrics/logs telemetry
client from master to the 6.x branch, now that the dependency audit shows
no Node engine blocker under the node:6.x builder runtime.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@juliobguedes
juliobguedes changed the base branch from master to 6.x September 17, 2026 13:45
@juliobguedes
juliobguedes force-pushed the feature/add-observability-to-6x-openspec branch from 8732737 to 2d0eddc Compare September 17, 2026 14:10
…ity-to-6x

The first implementation pass (PR #711) ported the DiagnosticsMetrics API
and telemetry client, but not the wiring that actually calls them per
request. Deploying 6.53.0-beta.0 to the iotest-ju2 test cluster confirmed
no metrics reached ClickHouse despite the feature flag being enabled,
because:

- service/index.ts never calls initializeTelemetry() or sets
  global.diagnosticsMetrics
- none of master's five consumer call sites (timings.ts, requestStats.ts,
  HttpClient/middlewares/metrics.ts, HttpAgentSingleton.ts, the @Metric
  GraphQL directive) exist on 6.x yet

Updates proposal.md, design.md, and specs/diagnostics-metrics/spec.md to
cover this wiring (new BDD requirements: boot-time initialization,
request-pipeline metric emission, graceful degradation), and rewrites
tasks.md as a single source of truth reflecting what's actually done
(groups 1-7, 9.1, 9.3, 10.1) versus what's still pending (new group 8:
the wiring itself, plus 9.2/9.4/10.2).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@daniyelnnr daniyelnnr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the spec is clear and easy to understand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants