Skip to content

feat(telemetry): add cluster dimensions to diagnostics#669

Open
juliobguedes wants to merge 3 commits into
masterfrom
feature/add-k8s-cluster-telemetry-dimensions
Open

feat(telemetry): add cluster dimensions to diagnostics#669
juliobguedes wants to merge 3 commits into
masterfrom
feature/add-k8s-cluster-telemetry-dimensions

Conversation

@juliobguedes

Copy link
Copy Markdown

What is the purpose of this pull request?

Add Kubernetes cluster identity and role as shared diagnostics resource attributes:

  • VTEX_CLUSTER_IDcluster_id
  • VTEX_CLUSTER_ROLEcluster_role

The values are trimmed, omitted independently when empty, and applied centrally to diagnostics metrics and logs without consuming per-call custom attribute limits.

What problem is this solving?

Diagnostics telemetry could not be grouped or filtered by its originating Kubernetes cluster, making cross-cluster dashboards and incident isolation harder.

How should this be manually tested?

  • yarn build
  • yarn lint
  • yarn test --runInBand
  • Start the service with VTEX_CLUSTER_ID and VTEX_CLUSTER_ROLE, then confirm the diagnostics resource attributes contain cluster_id and cluster_role.

Screenshots or example usage

Not applicable.

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

Attach cluster identity and role as shared resource attributes so metrics and logs can be filtered consistently across Kubernetes clusters.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonar-workflows

Copy link
Copy Markdown

Failed Quality Gate failed

  • 316 New Issues (is greater than 0)
  • 30.60% Coverage on New Code (is less than 75.00%)
  • 0.00% Security Hotspots Reviewed on New Code (is less than 100.00%)
  • D Reliability Rating on New Code (is worse than A)

Project ID: node-vtex-api

View in SonarQube

@juliobguedes juliobguedes self-assigned this Jul 23, 2026
juliobguedes and others added 2 commits July 23, 2026 14:29
Align cluster resource attributes with the stable VTEX IO semantic-convention keys pending their upstream package release.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant