monitoredresource

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResourceDetector = &Resource{
	attrs: detector.ResourceAttributes(),
	once:  new(sync.Once),
}

Functions

This section is empty.

Types

type Label

type Label map[string]string

type MonitoredResource

type MonitoredResource struct {
	*mrpb.MonitoredResource

	LogID string
}

func Detect

func Detect() *MonitoredResource

Detect returns new platform specific MonitoredResource.

func (*MonitoredResource) MarshalLogObject

func (mr *MonitoredResource) MarshalLogObject(enc zapcore.ObjectEncoder) error

MarshalLogObject implements zapcore.ObjectMarshaler.

type Resource added in v0.0.2

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

func (*Resource) ProjectID added in v0.0.2

func (r *Resource) ProjectID() string

func (*Resource) Region added in v0.0.2

func (r *Resource) Region() string

func (*Resource) Zone added in v0.0.2

func (r *Resource) Zone() string

type Type

type Type string
const (

	// CloudFunction is a function in Google Cloud Functions.
	//
	//  project_id
	// The identifier of the GCP project associated with this resource, such as "my-project".
	//
	//  function_name
	// The short function name.
	//
	//  region
	// The region in which the function is running.
	CloudFunction Type = "cloud_function"

	// CloudRunJob is a job in Cloud Run.
	//
	//  project_id
	// The identifier of the GCP project associated with this resource, such as "my-project".
	//
	//  job_name
	// Name of the monitored job.
	//
	//  location
	// Region where the job exists.
	CloudRunJob Type = "cloud_run_job"

	// CloudRunRevision is a revision in Cloud Run.
	//
	//  project_id
	// The identifier of the GCP project associated with this resource, such as "my-project".
	//
	//  service_name
	// Name of the service.
	//
	//  revision_name
	// Name of the monitored revision.
	//
	//  location
	// Region where the service is running.
	//
	//  configuration_name
	// Name of the configuration which created the monitored revision.
	CloudRunRevision Type = "cloud_run_revision"

	// GAEApp is an application running in Google App Engine (GAE).
	//
	//  project_id
	// The identifier of the GCP project associated with this resource, such as "my-project".
	//
	//  module_id
	// The service/module name.
	//
	//  version_id
	// The version name.
	//
	//  zone
	// The GAE zone where the application is running.
	GAEApp Type = "gae_app"
)

List of Monitored resource types.

https://cloud.google.com/logging/docs/api/v2/resource-list

Jump to

Keyboard shortcuts

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