telemetry

package
v0.6.17 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// The number of new metadata keys
	MMissingMetadataKeys    = stats.Int64("metadata-keys/counter", "The number of missing metadata keys", "1")
	MResourceFailedToCreate = stats.Int64("resource-failed-to-create/counter", "The number of resources failed to be created", "1")
	MRelationFailedToCreate = stats.Int64("relation-failed-to-create/counter", "The number of relations failed to be created", "1")
)
View Source
var (
	KeyMethod, _          = tag.NewKey("method")
	KeyMissingKey, _      = tag.NewKey("missing-key")
	KeyRequestDetails, _  = tag.NewKey("request-details")
	KeyRelationDetails, _ = tag.NewKey("relation-details")
)
View Source
var (
	MissingMetadataKeysView = &view.View{
		Name:        "metadata-keys/counter",
		Measure:     MMissingMetadataKeys,
		Description: "The number of missing metadata keys",

		Aggregation: view.Count(),
		TagKeys:     []tag.Key{KeyMethod, KeyMissingKey}}

	ResourceFailedToCreateView = &view.View{
		Name:        "resource-failed-to-create/counter",
		Measure:     MResourceFailedToCreate,
		Description: "The number of resources failed to be created",

		Aggregation: view.Count(),
		TagKeys:     []tag.Key{KeyMethod, KeyRequestDetails}}

	RelationFailedToCreateView = &view.View{
		Name:        "relation-failed-to-create/counter",
		Measure:     MRelationFailedToCreate,
		Description: "The number of relations failed to be created",

		Aggregation: view.Count(),
		TagKeys:     []tag.Key{KeyMethod, KeyRelationDetails}}
)

Functions

func SetupOpenCensus

func SetupOpenCensus(ctx context.Context, cfg Config) (*prometheus.Exporter, error)

Types

type Config

type Config struct {
	// OpenCensus exporter configurations.
	ServiceName string `yaml:"service_name" mapstructure:"service_name"`
}

Jump to

Keyboard shortcuts

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