stackdriver: contrib.go.opencensus.io/exporter/stackdriver/monitoredresource Index | Files

package monitoredresource

import "contrib.go.opencensus.io/exporter/stackdriver/monitoredresource"

Index

Package Files

aws_identity_doc_utils.go gcp_metadata_config.go monitored_resources.go

type AWSEC2Instance Uses

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

func (*AWSEC2Instance) MonitoredResource Uses

func (aws *AWSEC2Instance) MonitoredResource() (resType string, labels map[string]string)

MonitoredResource returns resource type and resource labels for AWSEC2Instance

type GCEInstance Uses

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

func (*GCEInstance) MonitoredResource Uses

func (gce *GCEInstance) MonitoredResource() (resType string, labels map[string]string)

MonitoredResource returns resource type and resource labels for GCEInstance

type GKEContainer Uses

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

func (*GKEContainer) MonitoredResource Uses

func (gke *GKEContainer) MonitoredResource() (resType string, labels map[string]string)

MonitoredResource returns resource type and resource labels for GKEContainer

type Interface Uses

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 Uses

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

Package monitoredresource imports 11 packages (graph) and is imported by 20 packages. Updated 2019-03-28. Refresh now. Tools for package owners.