Skip to content

Conversation

@bachgarash
Copy link

@bachgarash bachgarash commented Nov 14, 2025

Fixes #2986

This PR introduces a new attribute - service.criticality

Relevant discussion has been made during Service and Deployment Semconv SIG meet

Meet notes https://docs.google.com/document/d/1Fy6yXfZqrwN_oHw95Bdfg_0hzUgzlk3VO5wA1invgkI/edit?tab=t.0

Recording can be found https://docs.google.com/spreadsheets/d/1SYKfjYhZdm2Wh2Cl6KVQalKg_m4NhTPZqq-8SzEVO6s/edit?gid=0#gid=0 (6th of November)

Changes

This PR introduces a new semantic convention attribute service.criticality to enable classification of services based on their operational importance. This attribute will allow observability platforms to implement criticality-aware tracing, and sampling strategies.

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)

@bachgarash
Copy link
Author

bachgarash commented Nov 14, 2025

Links to the prototypes or existing instrumentations (when adding or changing conventions)

I need help with guidance on how to provide prototype for a newly introduced semantic convention attribute. Please, feel free drop your idea. Thanks in advance!

@lmolkova lmolkova moved this from Untriaged to Awaiting codeowners approval in Semantic Conventions Triage Nov 17, 2025
@bachgarash bachgarash requested a review from a team as a code owner November 17, 2025 20:28
@jsuereth
Copy link
Contributor

Note: The build is failing - My approval is for the proposed change, but please clean up the build and get all tests to pass. I believe this needs a make table-generation registry-generation pass at a minimum, and possibly other cleanups .

@bachgarash bachgarash requested a review from jsuereth November 20, 2025 16:10
@bachgarash bachgarash requested a review from a team as a code owner November 27, 2025 18:03
@thompson-tomo
Copy link
Contributor

@bachgarash can you regenerate the docs to take on the changes to the documentation templates?

@bachgarash
Copy link
Author

Hi there. I have added a basic prototype into Otel-demo as requested

open-telemetry/opentelemetry-demo#2770

@bachgarash bachgarash force-pushed the feat/service-criticality-attribute branch from 9679b6a to 0de4ab4 Compare November 28, 2025 09:11
@bachgarash bachgarash requested review from a team as code owners November 28, 2025 09:11
@bachgarash bachgarash requested a review from a team November 28, 2025 09:11
@bachgarash bachgarash requested review from a team as code owners November 28, 2025 09:11
@bachgarash bachgarash requested review from a team as code owners November 28, 2025 09:11
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 28, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@bachgarash bachgarash force-pushed the feat/service-criticality-attribute branch from 0de4ab4 to bf07d66 Compare November 28, 2025 09:17
Copy link
Contributor

@jsuereth jsuereth left a comment

Choose a reason for hiding this comment

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

Re-approving this with the demo.

@lmolkova lmolkova moved this from Awaiting codeowners approval to Needs More Approval in Semantic Conventions Triage Dec 1, 2025
@bachgarash bachgarash force-pushed the feat/service-criticality-attribute branch from eeb4735 to 08b5c96 Compare December 5, 2025 22:12
@thompson-tomo
Copy link
Contributor

Would service.instance.criticality be a better option given it is describing the criticality of the instance shown by being on the service.instance entity?

Comment on lines +107 to +112
This attribute enables classification of services based on their operational importance,
allowing observability platforms to implement criticality-aware tracing, monitoring,
and sampling strategies. By standardizing service criticality, organizations can implement
adaptive sampling rates (e.g., 100% for critical, 10% for low-priority services), optimize
telemetry costs by reducing data from non-critical services, improve incident response by
surfacing critical service traces first, and enable better capacity planning and resource allocation.
Copy link
Member

Choose a reason for hiding this comment

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

This is a great explanation and it definitely helps understand the reasoning behind the attribute. Perhaps it could be written in more actionable/non-prescriptive/spec-like manner?

E.g.

Suggested change
This attribute enables classification of services based on their operational importance,
allowing observability platforms to implement criticality-aware tracing, monitoring,
and sampling strategies. By standardizing service criticality, organizations can implement
adaptive sampling rates (e.g., 100% for critical, 10% for low-priority services), optimize
telemetry costs by reducing data from non-critical services, improve incident response by
surfacing critical service traces first, and enable better capacity planning and resource allocation.
note: >
Application developers are encouraged to set `service.criticality` to
express the operational importance of their services. Telemetry
consumers MAY use this attribute to optimize telemetry collection
or improve user experience.


These are the attributes which MAY be configurable via a dedicated environment variable
as specified in [OpenTelemetry Environment Variable Specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.51.0/specification/configuration/sdk-environment-variables.md):
as specified in [OpenTelemetry Environment Variable Specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.50.0/specification/configuration/sdk-environment-variables.md):
Copy link
Member

Choose a reason for hiding this comment

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

could you please undo this and similar changes?

## Service

Logical grouping of components.
<!-- semconv entity.service -->
Copy link
Member

Choose a reason for hiding this comment

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

is this change intentional?

@joaopgrassi
Copy link
Member

joaopgrassi commented Dec 9, 2025

Would service.instance.criticality be a better option given it is describing the criticality of the instance shown by being on the service.instance entity?

@thompson-tomo No, see: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/service.md

The criticality is a characteristic of the logical service, thus, implicitly applied to all its instances.

@thompson-tomo
Copy link
Contributor

@joaopgrassi that is what I had been thinking however the new attribute has been added to the service.instance entity as a descriptive attribute

| Description | [`service.criticality`](/docs/registry/attributes/service.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The operational criticality of the service. [3] | `critical`; `high`; `medium`; `low` |
rather than the being a descriptive attribute on the service entity. Hence the question.

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.

Please revert/undo the unrelated changes to the actual intended changes. Also blocking to avoiding merging until we all agree under which entity namespace this attribute should go service.* or service.instance.*

@@ -1,5 +1,5 @@
params:
next_version: "next_version_placeholder" # https://github.com/open-telemetry/weaver/issues/775
next_version: "next_version_placeholder" # https://github.com/open-telemetry/weaver/issues/775
Copy link
Member

Choose a reason for hiding this comment

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

Revert unrelated changes, please.


- name: "Semantic Conventions: Resources and Entities"
owner:
- name: "specs-semconv-maintainers" # TODO: Missing team user for entities?
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep unrelated changes outside the PR. There's a few others as well.

- ref: service.instance.id
role: identifying
requirement_level: required
- ref: service.criticality
Copy link
Member

Choose a reason for hiding this comment

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

@jsuereth do we really want to add this under the service.instance.* namespace? Wouldn't it make more sense that this is part of service.* one? I feel this is a characteristic of the logical service, that applies to all its instances. I wouldn't think it makes sense that one instance is more critical than another.

@github-project-automation github-project-automation bot moved this from Needs More Approval to Blocked in Semantic Conventions Triage Dec 9, 2025
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

Development

Successfully merging this pull request may close these issues.

New semconv attribute proposal - service.criticality

5 participants