Skip to content
Open
Show file tree
Hide file tree
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
22 changes: 22 additions & 0 deletions .chloggen/add_deployment_type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: deployment

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Enable the type of deployment to be captured to distinguish between provisioning and storage.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [2334]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
10 changes: 10 additions & 0 deletions docs/registry/attributes/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This document defines attributes for software deployments.
| <a id="deployment-id" href="#deployment-id">`deployment.id`</a> | string | The id of the deployment. | `1208` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="deployment-name" href="#deployment-name">`deployment.name`</a> | string | The name of the deployment. | `deploy my app`; `deploy-frontend` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="deployment-status" href="#deployment-status">`deployment.status`</a> | string | The status of the deployment. | `failed`; `succeeded` | ![Development](https://img.shields.io/badge/-development-blue) |
| <a id="deployment-type" href="#deployment-type">`deployment.type`</a> | string | The type of deployment which is occurring. | `publish`; `provision` | ![Development](https://img.shields.io/badge/-development-blue) |

**[1] `deployment.environment.name`:** `deployment.environment.name` does not affect the uniqueness constraints defined through
the `service.namespace`, `service.name` and `service.instance.id` resource attributes.
Expand All @@ -34,6 +35,15 @@ considered to be identifying the same service:
| `failed` | failed | ![Development](https://img.shields.io/badge/-development-blue) |
| `succeeded` | succeeded | ![Development](https://img.shields.io/badge/-development-blue) |

---

`deployment.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
|---|---|---|
| `provision` | The software is being provisioned on a machine aka the target. | ![Development](https://img.shields.io/badge/-development-blue) |
| `publish` | The software is being published to a registry/store. | ![Development](https://img.shields.io/badge/-development-blue) |

## Deployment Deprecated Attributes

Describes deprecated deployment attributes.
Expand Down
14 changes: 14 additions & 0 deletions model/deployment/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ groups:
brief: >
The status of the deployment.
stability: development
- id: deployment.type
stability: development
brief: >
The type of deployment which is occurring.
type:
members:
- id: publish
value: 'publish'
brief: The software is being published to a registry/store.
stability: development
- id: provision
value: 'provision'
brief: The software is being provisioned on a machine aka the target.
Copy link
Member

Choose a reason for hiding this comment

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

I'm having a hard time finding the difference between these two. Could you elaborate more? I'm also having a hard time finding how this attribute would be useful/used in reality. Can you maybe add use-case for it, or any instrumentation already using it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A scenario is within your cicd pipeline you could publish your artifact's to a registry/store for instance docker hub if building a container or could be provisioning a container instance running the artifact's.

Copy link
Member

Choose a reason for hiding this comment

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

I don't believe there is industry-wide notion of deployment type that is also known and available inside ci/cd pipeline. It's not clear how existing tooling would populate this attribute. The type is also a very broad term that could mean a lot of things, including k8s deployment strategy or similar Azure DevOps thing.

Defining semantic conventions usually means researching how things are done in multiple environments, finding commonalities, ensuring information is available and then documenting how to capture new things in these different environments.

Currently it seems we're inventing something new that is not widely applicable. It goes against best practices documented in this repo

- When defining a broad attribute applicable across multiple domains or systems,
check for existing standards or widely accepted best practices in the industry.
Avoid creating generic attributes that are not based on established standards.

stability: development
- id: deployment.environment.name
type: string
stability: development
Expand Down
Loading