stackdriver

package module
v0.0.0-...-af1ce48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// service/client
	IstioPrefix       = "istio.io/service/client/"
	IstioPrefixServer = "istio.io/service/server/"

	// "Sampled every 60 sec, not visible up to 180 sec" - so ~4 min window
	// for a test to validate metric after request is made, or for autoscale to adjust
	IstioMetrics = []string{

		"request_count",

		"roundtrip_latencies",

		"connection_close_count",
		"connection_open_count",

		"received_bytes_count",
		"sent_bytes_count",

		"request_bytes",
		"response_bytes",
	}

	IstioLabels = []string{
		"request_protocol",
		"service_authentication_policy",
		"mesh_uid",
		"destination_service_name",
		"destination_service_namespace",
		"destination_port",
		"source_principal",
		"source_workload_name",
		"source_workload_namespace",
		"source_owner",
		"destination_principal",
		"destination_workload_name",
		"destination_workload_namespace",
		"destination_owner",
		"source_canonical_service_name",
		"destination_canonical_service_name",
		"source_canonical_service_namespace",
		"destination_canonical_service_namespace",
		"source_canonical_revision",
		"destination_canonical_revision",

		"request_operation",
		"api_version",
		"response_code",
		"api_name",
	}

	VMResourceLabels = []string{
		"project_id",
		"instance_id",
		"zone",
	}
	PodResourceLabels = []string{
		"project_id",
		"location",
		"cluster_name",
		"namespace_name",
		"pod_name",
	}

	// This is aggregated from pod metrics.
	SvcResourceLabels = []string{
		"mesh_uid",
		"project_id",
		"location",
		"namespace_name",
		"canonical_service_name",
		"revision",
	}
)

Functions

This section is empty.

Types

type Stackdriver

type Stackdriver struct {
	// contains filtered or unexported fields
}

func NewStackdriver

func NewStackdriver(projectID string) (*Stackdriver, error)

func (*Stackdriver) ListResources

func (s *Stackdriver) ListResources(ctx context.Context, namespace, metricName, extra string) ([]*monitoring.TimeSeries, error)

For a metric, list resource types that generated the metric and the names.

func (*Stackdriver) ListTimeSeries

func (s *Stackdriver) ListTimeSeries(ctx context.Context, namespace, resourceType, metricName, extra string) ([]*monitoring.TimeSeries, error)

Get metrics.

Filter options: project, group.id, resource.type, resource.labels.[KEY], metric.type, metric.labels.[KEY]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL