From d439c6d752982f0a219a82b5d4379226e72f4a21 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Sun, 12 Feb 2023 00:04:48 -0800 Subject: [PATCH] update heroku following review --- .../resource/{ => cloud_provider}/heroku.yaml | 24 ++-------------- .../cloud_provider/heroku.md | 28 +++++++++++++++++++ .../resource/semantic_conventions/heroku.md | 18 ------------ 3 files changed, 31 insertions(+), 39 deletions(-) rename semantic_conventions/resource/{ => cloud_provider}/heroku.yaml (51%) create mode 100644 specification/resource/semantic_conventions/cloud_provider/heroku.md delete mode 100644 specification/resource/semantic_conventions/heroku.md diff --git a/semantic_conventions/resource/heroku.yaml b/semantic_conventions/resource/cloud_provider/heroku.yaml similarity index 51% rename from semantic_conventions/resource/heroku.yaml rename to semantic_conventions/resource/cloud_provider/heroku.yaml index 2236ca3929b..5ab15b7970e 100644 --- a/semantic_conventions/resource/heroku.yaml +++ b/semantic_conventions/resource/cloud_provider/heroku.yaml @@ -5,39 +5,21 @@ groups: brief: > Heroku dyno metadata attributes: - - id: release.version - type: string - brief: > - Identifier for the current release - examples: ['v42'] - requirement_level: optional - - id: release.creation_timestamp + - id: creation_timestamp type: string brief: > Time and date the release was created examples: [ '2022-10-23T18:00:42Z' ] requirement_level: optional - - id: release.commit + - id: commit type: string brief: > Commit hash for the current release examples: [ 'e6134959463efd8966b20e75b913cafe3f5ec' ] requirement_level: optional - - id: app.name - type: string - brief: > - Application name - examples: [ 'foo-app' ] - requirement_level: optional - - id: app.id + - id: id type: string brief: > Unique identifier for the application examples: [ '2daa2797-e42b-4624-9322-ec3f968df4da' ] requirement_level: optional - - id: dyno.id - type: string - brief: > - Dyno identifier. Used as host name - examples: [ '2vac3221-f56c-1897-4453-ba4d8638c1ac' ] - requirement_level: optional 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 00000000000..188f6267d39 --- /dev/null +++ b/specification/resource/semantic_conventions/cloud_provider/heroku.md @@ -0,0 +1,28 @@ +# Heroku + +**Status**: [Experimental](../../document-status.md) + +**type:** `heroku` + +**Description:** Heroku dyno metadata [1] + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| `heroku.creation_timestamp` | string | Time and date the release was created | `2022-10-23T18:00:42Z` | Optional | +| `heroku.commit` | string | Commit hash for the current release | `e6134959463efd8966b20e75b913cafe3f5ec` | Optional | +| `heroku.id` | string | Unique identifier for the application | `2daa2797-e42b-4624-9322-ec3f968df4da` | Optional | + + +**Data mapping:** + +| Dyno metadata environment variable | Resource attribute | +|------------------------------------|-----------------------------| +| `HEROKU_APP_ID` | `heroku.id` | +| `HEROKU_APP_NAME` | `service.name` | +| `HEROKU_DYNO_ID` | `service.instance.id` | +| `HEROKU_RELEASE_CREATED_AT` | `heroku.creation_timestamp` | +| `HEROKU_RELEASE_VERSION` | `service.version` | +| `HEROKU_SLUG_COMMIT` | `heroku.commit` | + +[1]: https://devcenter.heroku.com/articles/dyno-metadata \ No newline at end of file diff --git a/specification/resource/semantic_conventions/heroku.md b/specification/resource/semantic_conventions/heroku.md deleted file mode 100644 index f5ff654d72f..00000000000 --- a/specification/resource/semantic_conventions/heroku.md +++ /dev/null @@ -1,18 +0,0 @@ -# Heroku - -**Status**: [Experimental](../../document-status.md) - -**type:** `heroku` - -**Description:** Heroku dyno metadata [1] - - -| Attribute | Type | Description | Examples | Requirement Level | -|---|---|---|---|---| -| `heroku.release.version` | string | Identifier for the current release | `v42` | Optional | -| `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.name` | string | Application name | `foo-app` | Optional | -| `heroku.app.id` | string | Unique identifier for the application | `2daa2797-e42b-4624-9322-ec3f968df4da` | Optional | -| `heroku.dyno.id` | string | Dyno identifier. Used as host name | `2vac3221-f56c-1897-4453-ba4d8638c1ac` | Optional | - \ No newline at end of file