Skip to content

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

Open
craffit wants to merge 2 commits into
mainfrom
otel-empty-service-namespace
Open

craffit wants to merge 2 commits into
mainfrom
otel-empty-service-namespace

Conversation

@craffit

@craffit craffit commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Services without a service.namespace (attribute unset or empty) got inconsistent identities: services and resource relations used an invented default namespace, while instances, service-graph relations and monitors broke on the missing value. The namespace mapping also created an empty-name component, which sync rejects.

Per the OTel semantic conventions, service.namespace is optional and the unset namespace is just another valid namespace; service.instance.id is unique within its (service.namespace, service.name) pair. This change encodes the unset namespace 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> for such services. Service-graph relations no longer require the namespace dimension.
  • Monitors build the URN prefix with one label_replace, because PromQL drops empty labels and a missing label in urnTemplate yields an incomplete health state.

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

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

🤖 Generated with Claude Code

craffit and others added 2 commits October 26, 2026 15:22
… of a default namespace

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@craffit

craffit commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Switched to encoding an unset service.namespace as the empty string in identifiers (namespace/:service/<name>) instead of a separate namespace-free URN. Mappings no longer branch on the URN shape, and monitors need a single label_replace.

@craffit

craffit commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Paused. Instead of the label_replace workaround in the monitors, we want to evaluate CEL in urnTemplate (and other monitor template fields), consistent with the rest of our templating. This PR will be revisited once that is available. Tracking: https://github.com/StackVista/stackstate/issues/888

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