Skip to content
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

add semantic conventions for heroku #3075

Merged
merged 21 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from 15 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ release.

- Move X-Ray Env Variable propagation to span link instead of parent for AWS Lambda.
([#3166](https://github.com/open-telemetry/opentelemetry-specification/pull/3166))
- Add heroku resource semantic conventions.
atoulme marked this conversation as resolved.
Show resolved Hide resolved
[#3075](https://github.com/open-telemetry/opentelemetry-specification/pull/3075)
- BREAKING: Rename faas.execution to faas.invocation_id
([#3209](https://github.com/open-telemetry/opentelemetry-specification/pull/3209))
- BREAKING: Change faas.max_memory units to Bytes instead of MB
Expand Down
3 changes: 3 additions & 0 deletions semantic_conventions/resource/cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
25 changes: 25 additions & 0 deletions semantic_conventions/resource/cloud_provider/heroku.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
groups:
- id: heroku
prefix: heroku
type: resource
brief: >
Heroku dyno metadata
attributes:
- id: creation_timestamp
type: string
brief: >
Time and date the release was created
examples: [ '2022-10-23T18:00:42Z' ]
requirement_level: optional
- id: 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
1 change: 1 addition & 0 deletions specification/resource/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions specification/resource/semantic_conventions/cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Heroku

**Status**: [Experimental](../../../document-status.md)

**type:** `heroku`

atoulme marked this conversation as resolved.
Show resolved Hide resolved
**Description:** [Heroku dyno metadata]

<!-- semconv heroku -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `heroku.creation_timestamp` | string | Time and date the release was created | `2022-10-23T18:00:42Z` | Optional |
atoulme marked this conversation as resolved.
Show resolved Hide resolved
| `heroku.commit` | string | Commit hash for the current release | `e6134959463efd8966b20e75b913cafe3f5ec` | Optional |
atoulme marked this conversation as resolved.
Show resolved Hide resolved
| `heroku.app.id` | string | Unique identifier for the application | `2daa2797-e42b-4624-9322-ec3f968df4da` | Optional |
<!-- endsemconv -->

**Mapping:**

| Dyno metadata environment variable | Resource attribute |
|------------------------------------|-----------------------------|
| `HEROKU_APP_ID` | `heroku.id` |
atoulme marked this conversation as resolved.
Show resolved Hide resolved
| `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` |

Additionally, [the `cloud.provider` resource attribute MUST be set to `heroku`](../cloud.md).

[Heroku dyno metadata]: https://devcenter.heroku.com/articles/dyno-metadata