From 8abe0ffe8aa9d686c088d025968a95557dcacb1b Mon Sep 17 00:00:00 2001 From: Matej Gera Date: Mon, 6 Jul 2020 21:14:53 +0200 Subject: [PATCH 1/2] Add semantic convention for faas coldstart and container ID --- api/standard/resource.go | 4 ++++ api/standard/trace.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/api/standard/resource.go b/api/standard/resource.go index 5bb6beb2db7..60e5b01dcb9 100644 --- a/api/standard/resource.go +++ b/api/standard/resource.go @@ -66,6 +66,10 @@ const ( // A uniquely identifying name for the Container. ContainerNameKey = kv.Key("container.name") + // Container ID, usually a UUID, as for example used to + // identify Docker containers. The UUID might be abbreviated. + ContainerIDKey = kv.Key("container.id") + // Name of the image the container was built on. ContainerImageNameKey = kv.Key("container.image.name") diff --git a/api/standard/trace.go b/api/standard/trace.go index 850b5dd4c2a..2f322d0d04a 100644 --- a/api/standard/trace.go +++ b/api/standard/trace.go @@ -235,6 +235,10 @@ const ( // String containing the execution identifier of the function. FaaSExecutionKey = kv.Key("faas.execution") + // A boolean indicating that the serverless function is executed + // for the first time (aka cold start). + FaaSColdstartKey = kv.Key("faas.coldstart") + // The name of the source on which the operation was performed. // For example, in Cloud Storage or S3 corresponds to the bucket name, // and in Cosmos DB to the database name. From ef3fa59bea3edd88af7db295e33aa416d297585a Mon Sep 17 00:00:00 2001 From: Matej Gera Date: Mon, 6 Jul 2020 21:20:01 +0200 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b5b6dc82b5..5f37ce13da3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Added - Add `peer.service` semantic attribute. (#898) +- Add semantic convention for `faas.coldstart` and `container.id`. (#909) ### Changed