2020-03-25 14:47:17 -07:00
|
|
|
// Copyright The OpenTelemetry Authors
|
2020-03-09 09:30:42 -07:00
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2020-05-15 11:35:44 -07:00
|
|
|
// Package resourcekey contains standard resource attribute keys as defined
|
|
|
|
// by the OpenTelemetry specification
|
|
|
|
// (https://github.com/open-telemetry/opentelemetry-specification/tree/v0.4.0/specification/resource/semantic_conventions).
|
2020-05-15 11:32:03 -07:00
|
|
|
package resourcekey // import "go.opentelemetry.io/otel/sdk/resource/resourcekey"
|
2020-03-09 09:30:42 -07:00
|
|
|
|
|
|
|
// Constants for Service resources.
|
|
|
|
const (
|
|
|
|
// A uniquely identifying name for a Service.
|
2020-05-15 11:38:02 -07:00
|
|
|
ServiceName = "service.name"
|
|
|
|
ServiceNamespace = "service.namespace"
|
|
|
|
ServiceInstanceID = "service.instance.id"
|
|
|
|
ServiceVersion = "service.version"
|
2020-03-09 09:30:42 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// Constants for Library resources.
|
|
|
|
const (
|
|
|
|
// A uniquely identifying name for a Library.
|
2020-05-15 11:38:02 -07:00
|
|
|
LibraryName = "library.name"
|
|
|
|
LibraryLanguage = "library.language"
|
|
|
|
LibraryVersion = "library.version"
|
2020-03-09 09:30:42 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// Constants for Kubernetes resources.
|
|
|
|
const (
|
|
|
|
// A uniquely identifying name for the Kubernetes cluster. Kubernetes
|
|
|
|
// does not have cluster names as an internal concept so this may be
|
|
|
|
// set to any meaningful value within the environment. For example,
|
|
|
|
// GKE clusters have a name which can be used for this label.
|
2020-05-15 11:38:02 -07:00
|
|
|
K8SClusterName = "k8s.cluster.name"
|
|
|
|
K8SNamespaceName = "k8s.namespace.name"
|
|
|
|
K8SPodName = "k8s.pod.name"
|
|
|
|
K8SDeploymentName = "k8s.deployment.name"
|
2020-03-09 09:30:42 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// Constants for Container resources.
|
|
|
|
const (
|
|
|
|
// A uniquely identifying name for the Container.
|
2020-05-15 11:38:02 -07:00
|
|
|
ContainerName = "container.name"
|
|
|
|
ContainerImageName = "container.image.name"
|
|
|
|
ContainerImageTag = "container.image.tag"
|
2020-03-09 09:30:42 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// Constants for Cloud resources.
|
|
|
|
const (
|
2020-05-15 11:38:02 -07:00
|
|
|
CloudProvider = "cloud.provider"
|
|
|
|
CloudAccountID = "cloud.account.id"
|
|
|
|
CloudRegion = "cloud.region"
|
|
|
|
CloudZone = "cloud.zone"
|
2020-03-09 09:30:42 -07:00
|
|
|
|
|
|
|
// Cloud Providers
|
|
|
|
CloudProviderAWS = "aws"
|
|
|
|
CloudProviderGCP = "gcp"
|
|
|
|
CloudProviderAZURE = "azure"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Constants for Host resources.
|
|
|
|
const (
|
|
|
|
// A uniquely identifying name for the host.
|
2020-05-15 11:38:02 -07:00
|
|
|
HostName = "host.name"
|
2020-03-09 09:30:42 -07:00
|
|
|
|
|
|
|
// A hostname as returned by the 'hostname' command on host machine.
|
2020-05-15 11:38:02 -07:00
|
|
|
HostHostName = "host.hostname"
|
|
|
|
HostID = "host.id"
|
|
|
|
HostType = "host.type"
|
|
|
|
HostImageName = "host.image.name"
|
|
|
|
HostImageID = "host.image.id"
|
|
|
|
HostImageVersion = "host.image.version"
|
2020-03-09 09:30:42 -07:00
|
|
|
)
|