From d8b4dcc2de1c3ce47fc7171d87e613619a3ab95f Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Tue, 6 May 2025 22:23:21 -0500 Subject: [PATCH] Update semconv JSON schema for entities - Add `entity_associations` for metrics - Update `display_name` description to be more generic - Replace resource with updated entity schema --- schemas/semconv.schema.json | 54 +++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/schemas/semconv.schema.json b/schemas/semconv.schema.json index 14b5b466..94d356a5 100644 --- a/schemas/semconv.schema.json +++ b/schemas/semconv.schema.json @@ -15,6 +15,13 @@ } ] }, + { + "allOf": [ + { + "$ref": "#/$defs/EntitySemanticConvention" + } + ] + }, { "allOf": [ { @@ -99,6 +106,44 @@ } ] }, + "EntitySemanticConvention": { + "allOf": [ + { + "$ref": "#/$defs/SemanticConventionBase" + } + ], + "required": [ + "name" + ], + "properties": { + "type": { + "type": "string", + "const": "entity" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/$defs/Attribute" + }, + "description": "list of identifying attributes for the entity type" + }, + "descriptive_attributes": { + "type": "array", + "items": { + "$ref": "#/$defs/Attribute" + }, + "description": "list of descriptive attributes for the entity type" + }, + "relationships": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": "string" + }, + "description": "list of relationships for the entity type" + } + } + }, "SemanticConventionBase": { "type": "object", "required": [ @@ -165,7 +210,7 @@ "type": "string", "enum": [ "span", - "resource", + "entity", "metric", "event", "attribute_group" @@ -193,7 +238,7 @@ }, "display_name": { "type": "string", - "description": "the display name / title of the attribute group." + "description": "the display name / title of the semantic convention." }, "deprecated": { "$ref": "#/$defs/Deprecated" @@ -458,6 +503,11 @@ "unit": { "type": "string", "description": "The unit in which the metric is measured in." + }, + "entity_associations": { + "type": "array", + "items": { "type": "string" }, + "description": "list of entity associations for the metric" } } },