Skip to content

open-telemetry: handle services without service.namespace - #7

Merged
craffit merged 1 commit into
mainfrom
otel-empty-service-namespace
Nov 18, 2026
Merged

craffit merged 1 commit into
mainfrom
otel-empty-service-namespace

Conversation

@craffit

@craffit craffit commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Services without a service.namespace got inconsistent identities: services and resource relations used an invented default namespace, instances, service-graph relations and monitors broke on the missing value, and the namespace mapping created an empty-name component that sync rejects.

Per the OTel semantic conventions service.namespace is optional, and the unset namespace is a namespace in its own right. This PR encodes it as the empty string everywhere:

  • No namespace component is created for an unset or empty service.namespace.
  • Component mappings, relation mappings and monitors all produce urn:opentelemetry:namespace/:service/<name>. Service-graph relations no longer require the namespace dimensions.
  • Monitors resolve a missing service_namespace label with a CEL expression in urnTemplate. This needs StackVista/stackstate#956, which shipped in 2.13.0.

The async relation mappings now build their URNs in output from vars, the same way synchronous.sty does.

Identifiers for services without a namespace change from namespace/default to namespace/, so those components are recreated.

Replaces StackVista/contrib-stackpacks#39 and #40. The OTel StackPack moved to this repository.

Tracking: https://github.com/StackVista/stackstate/issues/888

🤖 Generated with Claude Code

@craffit
craffit requested a review from a team as a code owner November 17, 2026 13:56
@deontaljaard

Copy link
Copy Markdown

Can we also handle absent namespace labels in the presentation componentIdentifierTemplates? For example, services.sty:495 still requires ${service_namespace}. The chart query matches namespace-less series, but their returned labels can omit that key, causing the UI to lose the component link. The client/server chart templates have the same issue with their namespace labels.

@craffit craffit closed this Nov 18, 2026
@craffit craffit reopened this Nov 18, 2026
@craffit
craffit merged commit 72657e9 into main Nov 18, 2026
53 of 54 checks passed
@craffit
craffit deleted the otel-empty-service-namespace branch November 18, 2026 08:53
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