-
Notifications
You must be signed in to change notification settings - Fork 282
Initial cut at modelling service entities based on SIG discussions. #2963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
joaopgrassi
left a comment
There was a problem hiding this 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. |
ymotongpoo
left a comment
There was a problem hiding this 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.
joaopgrassi
left a comment
There was a problem hiding this 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.
Co-authored-by: Joao Grassi <[email protected]>
Co-authored-by: Joao Grassi <[email protected]>
| Http["`**service.name** | ||
| http-server`"] | ||
| Http1["`**service.instance.id** | ||
| aabcd-1231`"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| aabcd-1231`"] | |
| http-server-1231`"] |
| Http1["`**service.instance.id** | ||
| aabcd-1231`"] | ||
| Http2["`**service.instance.id** | ||
| aabcd-1234`"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| aabcd-1234`"] | |
| http-server-1234`"] |
| |---|---|---|---|---|---|---| | ||
| | Identity | [`service.name`](/docs/registry/attributes/service.md) |  | `Required` | string | Logical name of the service. [1] | `shoppingcart` | | ||
| | Identity | [`service.instance.id`](/docs/registry/attributes/service.md) |  | `Recommended` | string | The string ID of the service instance. [2] | `627cc493-f310-47de-96bd-71410b7dec09` | | ||
| | Identity | [`service.namespace`](/docs/registry/attributes/service.md) |  | `Recommended` | string | A namespace for `service.name`. [3] | `Shop` | |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Fixes #2880
Changes
serviceentity to consist of three components and describes eachImportant
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
[chore]