diff --git a/rules/RES-006.md b/rules/RES-006.md new file mode 100644 index 0000000..300faba --- /dev/null +++ b/rules/RES-006.md @@ -0,0 +1,16 @@ +**Rule ID:** RES-006 + +**Description:** `service.criticality` uses a valid enum value + +**Rationale:** The `service.criticality` resource attribute indicates the operational importance level of a service. Using standardized enum values enables automated prioritization of alerts, incidents, and resource allocation decisions across heterogeneous environments. Without consistent values, tooling cannot reliably compare or act on criticality levels. Defined in the [OTel Service and Deployment Semantic Conventions](https://github.com/open-telemetry/community/blob/main/projects/service-and-deployment-semconv.md) (Phase 1). + +**Target:** Resource + +**Criteria:** If the `service.criticality` resource attribute is present, its value MUST be one of the following enum values: `mission_critical`, `high`, `medium`, `low`. The attribute MUST NOT contain any other value. + +**Examples:** + +- "Resource attribute `service.criticality` is set to `critical` instead of a valid enum value (`mission_critical`, `high`, `medium`, `low`)." +- "Resource attribute `service.criticality` is set to `HIGH` (uppercase) instead of the expected lowercase `high`." + +**Impact:** Normal diff --git a/rules/RES-007.md b/rules/RES-007.md new file mode 100644 index 0000000..b2d8d2b --- /dev/null +++ b/rules/RES-007.md @@ -0,0 +1,16 @@ +**Rule ID:** RES-007 + +**Description:** `deployment.environment.name` is present + +**Rationale:** The `deployment.environment.name` resource attribute specifies the environment where the service is deployed (e.g., `production`, `staging`). This attribute is essential for environment-aware analysis, enabling teams to filter telemetry by environment, apply environment-specific alerting thresholds, and prevent confusion between production and non-production data. It is part of the [OpenTelemetry Resource Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/resource/deployment-environment/) and is being stabilized as part of the [OTel Service and Deployment Semantic Conventions](https://github.com/open-telemetry/community/blob/main/projects/service-and-deployment-semconv.md) (Phase 2). + +**Target:** Resource + +**Criteria:** Resource attributes MUST contain a `deployment.environment.name` key with a non-empty string value. The attribute MUST NOT be null, undefined, or an empty string. + +**Examples:** + +- "Resource attribute `deployment.environment.name` is missing from the resource attributes." +- "Resource attribute `deployment.environment.name` is present but has an empty string value." + +**Impact:** Important