Skip to content

Commit 1c80947

Browse files
committed
chore: improve the model for the deployment entity
1 parent fc4cfc6 commit 1c80947

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

model/deployment/entities.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
# SPDX-FileCopyrightText: Copyright 2026 Dash0 Inc.
22

3-
# Note weaver requires all used resource attributes to be defined on an entity to pass validation.
4-
# The current iteration of the deployment resource does not include optional deployment attributes.
5-
# This entity exists to as a compatibility layer to allow
3+
# Note: We want to require for deployment events both the service identity (service.name with
4+
# optionally service.namespace and service.version) and the deployment identity (deployment.name,
5+
# deployment.environment.name, deployment.id).
6+
# Unfortunately, the `entioty_associations` field is a "one of" semantics, meaning that, if we
7+
# associate with both the service and the deployment, any log event satisfying *either* will pass
8+
# validation.
69
groups:
7-
- id: entity.internal.dash0.deployment
10+
- id: "dash0.deployment"
811
type: entity
912
stability: development
10-
name: deployment
13+
name: deployment-resource-attributes
1114
brief: >
12-
Mock entity for compatibility with Weaver, allowing additional optional attributes to pass validation
15+
Entity describing which resource attributes are required and which recommended to be set on
16+
a `dash0.deployment` event.
1317
attributes:
18+
- ref: service.name
19+
requirement_level: required
20+
- ref: service.namespace
21+
requirement_level: recommended
22+
- ref: service.version
23+
requirement_level: recommended
1424
- ref: deployment.name
1525
requirement_level: recommended
26+
- ref: deployment.environment.name
27+
requirement_level: recommended
1628
- ref: deployment.id
1729
requirement_level: recommended

model/deployment/events.yaml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# SPDX-FileCopyrightText: Copyright 2026 Dash0 Inc.
22

3-
imports:
4-
entities:
5-
- service
6-
- service.namespace
7-
- deployment
8-
- vcs.repo
9-
- vcs.ref
10-
113
groups:
124
- id: event.dash0.deployment
135
type: event
@@ -31,11 +23,8 @@ groups:
3123
* `deployment.name`
3224
* `deployment.id`
3325
34-
# Disabled entity_associations because they are currently not specific enough yet (cant define requirement_level)
35-
# entity_associations:
36-
# - service
37-
# - service.namespace
38-
# - deployment
26+
entity_associations:
27+
- entity.internal.dash0.deployment
3928

4029
attributes:
4130
- ref: deployment.status

0 commit comments

Comments
 (0)