Standard Resources

June 19, 2019 ยท View on GitHub

This page lists the standard resource types in OpenCensus. For more details on how resources can be combined see this.

OpenCensus defines these fields.

TODOs

  • Add logical compute units: Service, Task - instance running in a service.
  • Add more compute units: Process, Lambda Function, AppEngine unit, etc.
  • Add Device (mobile) and Web Browser.
  • Decide if lower case strings only.
  • Consider to add optional/required for each label and combination of labels (e.g when supplying a k8s resource all k8s may be required).

Compute Unit

Resources defining a compute unit (e.g. Container, Process, Lambda Function).

Container

type: container

Description: A container instance. This resource can be merged with a deployment service resource, a compute instance resource, and an environment resource.

LabelDescriptionExample
container.nameContainer name.opencenus-autoconf
container.image.nameName of the image the container was built on.gcr.io/opencensus/operator
container.image.tagContainer image tag.0.1

Deployment Service

Resources defining a deployment service (e.g. Kubernetes).

Kubernetes

type: k8s

Description: A Kubernetes resource. This resource can be merged with a compute instance resource, and/or an environment resource.

LabelDescriptionExample
k8s.cluster.nameThe name of the cluster that the pod is running in.opencensus-cluster
k8s.namespace.nameThe name of the namespace that the pod is running in.default
k8s.pod.nameThe name of the pod.opencensus-pod-autoconf
k8s.deployment.nameThe name of the deployment.opencensus

Compute Instance

Resources defining a computing instance (e.g. host).

Host

type: host

Description: A host is defined as a general computing instance. This resource should be merged with an environment resource.

LabelDescriptionExample
host.hostnameHostname of the host.
It contains what the hostname command returns on the host machine.
opencensus-test
host.idUnique host id.
For Cloud this must be the instance_id assigned by the cloud provider
opencensus-test
host.nameName of the host.
It may contain what hostname returns on Unix systems, the fully qualified, or a name specified by the user.
opencensus-test
host.typeType of host.
For Cloud this must be the machine type.
n1-standard-1

Environment

Resources defining a running environment (e.g. Cloud, Data Center).

Cloud

type: cloud

Description: A cloud infrastructure (e.g. GCP, Azure, AWS).

LabelDescriptionExample
cloud.providerName of the cloud provider.
Example values are aws, azure, gcp.
gcp
cloud.account.idThe cloud account id used to identify different entities.opencensus
cloud.regionA specific geographical location where different entities can runus-central1
cloud.zoneZones are a sub set of the region connected through low-latency links.
In aws it is called availability-zone.
us-central1-a