diff --git a/semantic_conventions/resource/cloud.yaml b/semantic_conventions/resource/cloud.yaml index d44ea035d..321877ea6 100644 --- a/semantic_conventions/resource/cloud.yaml +++ b/semantic_conventions/resource/cloud.yaml @@ -21,6 +21,9 @@ groups: - id: 'gcp' value: 'gcp' brief: 'Google Cloud Platform' + - id: 'heroku' + value: 'heroku' + brief: 'Heroku Platform as a Service' - id: 'ibm_cloud' value: 'ibm_cloud' brief: 'IBM Cloud' diff --git a/semantic_conventions/resource/cloud_provider/heroku.yaml b/semantic_conventions/resource/cloud_provider/heroku.yaml new file mode 100644 index 000000000..4e8f30902 --- /dev/null +++ b/semantic_conventions/resource/cloud_provider/heroku.yaml @@ -0,0 +1,25 @@ +groups: + - id: heroku + prefix: heroku + type: resource + brief: > + Heroku dyno metadata + attributes: + - id: release.creation_timestamp + type: string + brief: > + Time and date the release was created + examples: [ '2022-10-23T18:00:42Z' ] + requirement_level: optional + - id: release.commit + type: string + brief: > + Commit hash for the current release + examples: [ 'e6134959463efd8966b20e75b913cafe3f5ec' ] + requirement_level: optional + - id: app.id + type: string + brief: > + Unique identifier for the application + examples: [ '2daa2797-e42b-4624-9322-ec3f968df4da' ] + requirement_level: optional diff --git a/specification/resource/semantic_conventions/README.md b/specification/resource/semantic_conventions/README.md index df8a90e08..b025f789f 100644 --- a/specification/resource/semantic_conventions/README.md +++ b/specification/resource/semantic_conventions/README.md @@ -176,3 +176,4 @@ Valid cloud providers are: - [Google Cloud Platform](https://cloud.google.com/) (`gcp`) - [Microsoft Azure](https://azure.microsoft.com/) (`azure`) - [Tencent Cloud](https://www.tencentcloud.com/) (`tencent_cloud`) +- [Heroku dyno](./cloud_provider/heroku.md) diff --git a/specification/resource/semantic_conventions/cloud.md b/specification/resource/semantic_conventions/cloud.md index f2dee0b2a..b1f725c2e 100644 --- a/specification/resource/semantic_conventions/cloud.md +++ b/specification/resource/semantic_conventions/cloud.md @@ -29,6 +29,7 @@ | `aws` | Amazon Web Services | | `azure` | Microsoft Azure | | `gcp` | Google Cloud Platform | +| `heroku` | Heroku Platform as a Service | | `ibm_cloud` | IBM Cloud | | `tencent_cloud` | Tencent Cloud | diff --git a/specification/resource/semantic_conventions/cloud_provider/heroku.md b/specification/resource/semantic_conventions/cloud_provider/heroku.md new file mode 100644 index 000000000..a339fa19b --- /dev/null +++ b/specification/resource/semantic_conventions/cloud_provider/heroku.md @@ -0,0 +1,30 @@ +# Heroku + +**Status**: [Experimental](../../../document-status.md) + +**type:** `heroku` + +**Description:** [Heroku dyno metadata] + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| `heroku.release.creation_timestamp` | string | Time and date the release was created | `2022-10-23T18:00:42Z` | Optional | +| `heroku.release.commit` | string | Commit hash for the current release | `e6134959463efd8966b20e75b913cafe3f5ec` | Optional | +| `heroku.app.id` | string | Unique identifier for the application | `2daa2797-e42b-4624-9322-ec3f968df4da` | Optional | + + +**Mapping:** + +| Dyno metadata environment variable | Resource attribute | +|------------------------------------|-------------------------------------| +| `HEROKU_APP_ID` | `heroku.app.id` | +| `HEROKU_APP_NAME` | `service.name` | +| `HEROKU_DYNO_ID` | `service.instance.id` | +| `HEROKU_RELEASE_CREATED_AT` | `heroku.release.creation_timestamp` | +| `HEROKU_RELEASE_VERSION` | `service.version` | +| `HEROKU_SLUG_COMMIT` | `heroku.release.commit` | + +Additionally, [the `cloud.provider` resource attribute MUST be set to `heroku`](../cloud.md). + +[Heroku dyno metadata]: https://devcenter.heroku.com/articles/dyno-metadata