Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSEC2Instance ¶
type AWSEC2Instance struct { // AWSAccount is the AWS account number for the VM. AWSAccount string // InstanceID is the instance id of the instance. InstanceID string // Region is the AWS region for the VM. The format of this field is "aws:{region}", // where supported values for {region} are listed at // http://docs.aws.amazon.com/general/latest/gr/rande.html. Region string }
AWSEC2Instance represents aws_ec2_instance type monitored resource. For definition refer to https://cloud.google.com/monitoring/api/resources#tag_aws_ec2_instance Deprecated: please use aws.EC2Container from "contrib.go.opencensus.io/exporter/stackdriver/monitoredresource/aws".
func (*AWSEC2Instance) MonitoredResource ¶
func (ec2 *AWSEC2Instance) MonitoredResource() (resType string, labels map[string]string)
MonitoredResource returns resource type and resource labels for AWSEC2Instance
type GCEInstance ¶
type GCEInstance struct { // ProjectID is the identifier of the GCP project associated with this resource, such as "my-project". ProjectID string // InstanceID is the numeric VM instance identifier assigned by Compute Engine. InstanceID string // Zone is the Compute Engine zone in which the VM is running. Zone string }
GCEInstance represents gce_instance type monitored resource. For definition refer to https://cloud.google.com/monitoring/api/resources#tag_gce_instance Deprecated: please use gcp.GCEInstance from "contrib.go.opencensus.io/exporter/stackdriver/monitoredresource/gcp".
func (*GCEInstance) MonitoredResource ¶
func (gce *GCEInstance) MonitoredResource() (resType string, labels map[string]string)
MonitoredResource returns resource type and resource labels for GCEInstance
type GKEContainer ¶
type GKEContainer struct { // ProjectID is the identifier of the GCP project associated with this resource, such as "my-project". ProjectID string // InstanceID is the numeric VM instance identifier assigned by Compute Engine. InstanceID string // ClusterName is the name for the cluster the container is running in. ClusterName string // ContainerName is the name of the container. ContainerName string // NamespaceID is the identifier for the cluster namespace the container is running in NamespaceID string // PodID is the identifier for the pod the container is running in. PodID string // Zone is the Compute Engine zone in which the VM is running. Zone string // LoggingMonitoringV2Enabled is the identifier if user enabled V2 logging and monitoring for GKE LoggingMonitoringV2Enabled bool }
GKEContainer represents gke_container type monitored resource. For definition refer to https://cloud.google.com/monitoring/api/resources#tag_gke_container Deprecated: please use gcp.GKEContainer from "contrib.go.opencensus.io/exporter/stackdriver/monitoredresource/gcp".
func (*GKEContainer) MonitoredResource ¶
func (gke *GKEContainer) MonitoredResource() (resType string, labels map[string]string)
MonitoredResource returns resource type and resource labels for GKEContainer
type Interface ¶
type Interface interface { // MonitoredResource returns the resource type and resource labels. MonitoredResource() (resType string, labels map[string]string) }
Interface is a type that represent monitor resource that satisfies monitoredresource.Interface
func Autodetect ¶
func Autodetect() Interface
Autodetect auto detects monitored resources based on the environment where the application is running. It supports detection of following resource types 1. gke_container: 2. gce_instance: 3. aws_ec2_instance:
Returns MonitoredResInterface which implements getLabels() and getType() For resource definition go to https://cloud.google.com/monitoring/api/resources