OpenTelemetry PHP

ServiceIncubatingAttributes

Semantic attributes and corresponding values for service.

Tags
see
https://opentelemetry.io/docs/specs/semconv/registry/attributes/service/

May contain @experimental Semantic Conventions which may change or be removed in the future.

Table of Contents

Constants

SERVICE_CRITICALITY  : mixed = 'service.criticality'
The operational criticality of the service.
SERVICE_CRITICALITY_VALUE_CRITICAL  : mixed = 'critical'
Service is business-critical; downtime directly impacts revenue, user experience, or core functionality.
SERVICE_CRITICALITY_VALUE_HIGH  : mixed = 'high'
Service is important but has degradation tolerance or fallback mechanisms.
SERVICE_CRITICALITY_VALUE_LOW  : mixed = 'low'
Service is non-essential to core operations; used for background tasks or internal tools.
SERVICE_CRITICALITY_VALUE_MEDIUM  : mixed = 'medium'
Service provides supplementary functionality; degradation has limited user impact.
SERVICE_INSTANCE_COST_CENTER_ID  : mixed = 'service.instance.cost_center.id'
Identifier of the cost center associated with the service instance.
SERVICE_INSTANCE_COST_CENTER_NAME  : mixed = 'service.instance.cost_center.name'
Name of the cost center associated with the service instance.
SERVICE_INSTANCE_ID  : mixed = 'service.instance.id'
The string ID of the service instance.
SERVICE_NAME  : mixed = 'service.name'
Logical name of the service.
SERVICE_NAMESPACE  : mixed = 'service.namespace'
A namespace for `service.name`.
SERVICE_VERSION  : mixed = 'service.version'
The version string of the service component. The format is not defined by these conventions.

Constants

SERVICE_CRITICALITY

The operational criticality of the service.

public mixed SERVICE_CRITICALITY = 'service.criticality'

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.

Tags
experimental

SERVICE_CRITICALITY_VALUE_CRITICAL

Service is business-critical; downtime directly impacts revenue, user experience, or core functionality.

public mixed SERVICE_CRITICALITY_VALUE_CRITICAL = 'critical'
Tags
experimental

SERVICE_CRITICALITY_VALUE_HIGH

Service is important but has degradation tolerance or fallback mechanisms.

public mixed SERVICE_CRITICALITY_VALUE_HIGH = 'high'
Tags
experimental

SERVICE_CRITICALITY_VALUE_LOW

Service is non-essential to core operations; used for background tasks or internal tools.

public mixed SERVICE_CRITICALITY_VALUE_LOW = 'low'
Tags
experimental

SERVICE_CRITICALITY_VALUE_MEDIUM

Service provides supplementary functionality; degradation has limited user impact.

public mixed SERVICE_CRITICALITY_VALUE_MEDIUM = 'medium'
Tags
experimental

SERVICE_INSTANCE_COST_CENTER_ID

Identifier of the cost center associated with the service instance.

public mixed SERVICE_INSTANCE_COST_CENTER_ID = 'service.instance.cost_center.id'

The cost center identifier enables tracking and attribution of service resource costs to organizational units, billing accounts, or teams. It is typically a string identifier such as a billing account ID, cost allocation code, or internal accounting ID.

Tags
experimental

SERVICE_INSTANCE_COST_CENTER_NAME

Name of the cost center associated with the service instance.

public mixed SERVICE_INSTANCE_COST_CENTER_NAME = 'service.instance.cost_center.name'

A human-readable name of the cost center, department, or organizational unit responsible for the service instance costs.

Tags
experimental

SERVICE_INSTANCE_ID

The string ID of the service instance.

public mixed SERVICE_INSTANCE_ID = 'service.instance.id'

MUST be unique for each instance of the same service.namespace,service.name pair (in other words service.namespace,service.name,service.instance.id triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service).

Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 RFC 4122 UUID, but are free to use an inherent unique ID as the source of this value if stability is desirable. In that case, the ID SHOULD be used as source of a UUID Version 5 and SHOULD use the following UUID as the namespace: 4d63009a-8d0f-11ee-aad7-4c796ed8e320.

UUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is needed. Similar to what can be seen in the man page for the /etc/machine-id file, the underlying data, such as pod name and namespace should be treated as confidential, being the user's choice to expose it or not via another resource attribute.

For applications running behind an application server (like unicorn), we do not recommend using one identifier for all processes participating in the application. Instead, it's recommended each division (e.g. a worker thread in unicorn) to have its own instance.id.

It's not recommended for a Collector to set service.instance.id if it can't unambiguously determine the service instance that is generating that telemetry. For instance, creating an UUID based on pod.name will likely be wrong, as the Collector might not know from which container within that pod the telemetry originated. However, Collectors can set the service.instance.id if they can unambiguously determine the service instance for that telemetry. This is typically the case for scraping receivers, as they know the target address and port.

Tags
stable

SERVICE_NAME

Logical name of the service.

public mixed SERVICE_NAME = 'service.name'

MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to unknown_service: concatenated with the process executable name, e.g. unknown_service:bash. If the process executable name is not available, the value MUST be set to unknown_service. The process executable name is the name of the process executable, the same value as described by the process.executable.name resource attribute.

Tags
stable

SERVICE_NAMESPACE

A namespace for `service.name`.

public mixed SERVICE_NAMESPACE = 'service.namespace'

A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. service.name is expected to be unique within the same namespace. If service.namespace is not specified in the Resource then service.name is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.

Tags
stable

SERVICE_VERSION

The version string of the service component. The format is not defined by these conventions.

public mixed SERVICE_VERSION = 'service.version'
Tags
stable
On this page

Search results