1 // Copyright 2019, OpenCensus Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Package resourcekeys contains well known type and label keys for resources. 16 package resourcekeys // import "go.opencensus.io/resource/resourcekeys" 17 18 // Constants for Kubernetes resources. 19 const ( 20 K8SType = "k8s" 21 22 // A uniquely identifying name for the Kubernetes cluster. Kubernetes 23 // does not have cluster names as an internal concept so this may be 24 // set to any meaningful value within the environment. For example, 25 // GKE clusters have a name which can be used for this label. 26 K8SKeyClusterName = "k8s.cluster.name" 27 K8SKeyNamespaceName = "k8s.namespace.name" 28 K8SKeyPodName = "k8s.pod.name" 29 K8SKeyDeploymentName = "k8s.deployment.name" 30 ) 31 32 // Constants for Container resources. 33 const ( 34 ContainerType = "container" 35 36 // A uniquely identifying name for the Container. 37 ContainerKeyName = "container.name" 38 ContainerKeyImageName = "container.image.name" 39 ContainerKeyImageTag = "container.image.tag" 40 ) 41 42 // Constants for Cloud resources. 43 const ( 44 CloudType = "cloud" 45 46 CloudKeyProvider = "cloud.provider" 47 CloudKeyAccountID = "cloud.account.id" 48 CloudKeyRegion = "cloud.region" 49 CloudKeyZone = "cloud.zone" 50 51 // Cloud Providers 52 CloudProviderAWS = "aws" 53 CloudProviderGCP = "gcp" 54 CloudProviderAZURE = "azure" 55 ) 56 57 // Constants for Host resources. 58 const ( 59 HostType = "host" 60 61 // A uniquely identifying name for the host. 62 HostKeyName = "host.name" 63 64 // A hostname as returned by the 'hostname' command on host machine. 65 HostKeyHostName = "host.hostname" 66 HostKeyID = "host.id" 67 HostKeyType = "host.type" 68 ) 69