Skip to content

Conversation

@jsuereth
Copy link
Contributor

Fixes #2880

Changes

  • Updates the service entity to consist of three components and describes each
  • Adds a service specific markdown file for resource modelling
  • Migrates existing attributes to appropriate entities in service.

Important

Pull requests acceptance are subject to the triage process as described in Issue and PR Triage Management.
PRs that do not follow the guidance above, may be automatically rejected and closed.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Change log entry added, according to the guidelines in When to add a changelog entry.
    • If your PR does not need a change log, start the PR title with [chore]
  • Links to the prototypes or existing instrumentations (when adding or changing conventions)

Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

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

I asked AI about how our model relates to k8s constructs. Here's the overview (which nicely aligns with our vision/goal/discussions so far)

OpenTelemetry Attribute Kubernetes Construct Description
service.name Deployment or Service Represents the logical name of the application or microservice. Typically aligns with a Kubernetes Deployment or Service name.
service.namespace Namespace Groups related services together. Aligns with Kubernetes namespaces for logical organization and isolation.
service.instance.id Container ID Uniquely identifies a specific instance of the service. Maps to the container runtime ID for the service's container.
service.version Container Image Tag Tracks the version of the service. Maps to the container image tag specified in the Deployment spec or Pod template.

Copy link

@ymotongpoo ymotongpoo left a comment

Choose a reason for hiding this comment

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

I just took a glance for the update. I'll add more comments if I have any findings.

@github-actions github-actions bot added enhancement New feature or request area:service labels Nov 20, 2025
@jsuereth jsuereth marked this pull request as ready for review November 20, 2025 14:02
@jsuereth jsuereth requested review from a team as code owners November 20, 2025 14:02
Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

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

Looks great! Just a few, not blocking comments.

@lmolkova lmolkova moved this from Untriaged to Awaiting codeowners approval in Semantic Conventions Triage Nov 24, 2025
jsuereth and others added 2 commits November 24, 2025 15:09
Http["`**service.name**
http-server`"]
Http1["`**service.instance.id**
aabcd-1231`"]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
aabcd-1231`"]
http-server-1231`"]

Http1["`**service.instance.id**
aabcd-1231`"]
Http2["`**service.instance.id**
aabcd-1234`"]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
aabcd-1234`"]
http-server-1234`"]

|---|---|---|---|---|---|---|
| Identity | [`service.name`](/docs/registry/attributes/service.md) | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `Required` | string | Logical name of the service. [1] | `shoppingcart` |
| Identity | [`service.instance.id`](/docs/registry/attributes/service.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The string ID of the service instance. [2] | `627cc493-f310-47de-96bd-71410b7dec09` |
| Identity | [`service.namespace`](/docs/registry/attributes/service.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | A namespace for `service.name`. [3] | `Shop` |
Copy link
Member

Choose a reason for hiding this comment

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

is it ok that the Identity for service is only unique within another Entity (service.namespace)?

it wasn't clear to me from reading https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/entities/data-model.md#minimally-sufficient-identity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. For any entity, we only guarantee global-uniqueness (i.e within some other entity).

E.g a process Identity is only unique within the context of some host.

That said, there's a balance to be had here of not requiring a bajillion entities on Resource to have a fully unique identity. Given, today, not all services have a namespace, I think it's reasonable to have it optional, and if you want to engage with namespace, you provide all of service.namespace, service + instance entities.

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

Labels

area:service enhancement New feature or request

Projects

Status: Awaiting codeowners approval

Development

Successfully merging this pull request may close these issues.

Decide if service and service.instance are different entities

4 participants