monitoring

package
v0.0.0-...-6146252 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2021 The Bazel Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package monitoring provides functionality to report metrics to Google Cloud Monitoring a.k.a. Stackdriver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the handle to interact with Google Cloud Monitoring.

func NewClient

func NewClient(ctx context.Context, projectID string) (*Client, error)

NewClient initializes a new monitoring client.

func (*Client) DeleteMetrics

func (c *Client) DeleteMetrics(ctx context.Context) error

DeleteMetrics deletes all metrics known to this client. Exists for convenience to help with cleanup when metrics are being renamed. Caveat: This only deletes the metric descriptors. Metric data already reported can't be deleted & are deleted according to Cloud Monitoring retention policies. Cloud monitoring will continue to charge for the data until it's deleted by the retention policy. However, deleting the metric descriptors renders the data inaccessible even though they still generate charges.

func (*Client) ReportToolchainConfigsGeneration

func (c *Client) ReportToolchainConfigsGeneration(ctx context.Context, imageName string, success bool) error

ReportToolchainConfigsGeneration reports the completion of toolchain configs generation to Stackdriver.

func (*Client) ReportToolchainConfigsTest

func (c *Client) ReportToolchainConfigsTest(ctx context.Context, imageName string, success bool) error

ReportToolchainConfigsTest reports the completion of toolchain configs test to Stackdriver.

func (*Client) ReportToolchainConfigsUpload

func (c *Client) ReportToolchainConfigsUpload(ctx context.Context, imageName string, success bool) error

ReportToolchainConfigsUpload reports the completion of toolchain configs upload to Stackdriver.

Jump to

Keyboard shortcuts

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