Skip to content

Update semconv JSON schema for entities #731

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 52 additions & 2 deletions schemas/semconv.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
}
]
},
{
"allOf": [
{
"$ref": "#/$defs/EntitySemanticConvention"
}
]
},
{
"allOf": [
{
Expand Down Expand Up @@ -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": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't exist yet.

Also I'm going to be talking about this in today's tooling sync, but we may actually want descriptive to be an aspect of attribute, vs. a separate bundle, both for the ref aspect of weaver and the diff aspect.

"type": "array",
"items": {
"$ref": "#/$defs/Attribute"
},
"description": "list of descriptive attributes for the entity type"
},
"relationships": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This also doesn't exist in weaver yet, so we should hold off adding it.

"type": "array",
"items": {
"type": "object",
"additionalProperties": "string"
},
"description": "list of relationships for the entity type"
}
}
},
"SemanticConventionBase": {
"type": "object",
"required": [
Expand Down Expand Up @@ -165,7 +210,7 @@
"type": "string",
"enum": [
"span",
"resource",
"entity",
"metric",
"event",
"attribute_group"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -458,6 +503,11 @@
"unit": {
"type": "string",
"description": "The unit in which the metric is measured in."
},
"entity_associations": {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can actually add this to Event + Span as well.

"type": "array",
"items": { "type": "string" },
"description": "list of entity associations for the metric"
}
}
},
Expand Down
Loading