googlecloud

package
v0.0.0-...-3081fbb Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

The googlecloud package supports telemetry (tracing, metrics and logging) using Google Cloud services.

The googlecloud package supports telemetry (tracing, metrics and logging) using Google Cloud services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, cfg Config) (err error)

Init initializes all telemetry in this package. In the dev environment, this does nothing unless [Options.ForceExport] is true.

Types

type Config

type Config struct {
	// ID of the project to use. Required.
	ProjectID string
	// Export to Google Cloud even in the dev environment.
	ForceExport bool

	// The interval for exporting metric data.
	// The default is 60 seconds.
	MetricInterval time.Duration

	// The minimum level at which logs will be written.
	// Defaults to [slog.LevelInfo].
	LogLevel slog.Leveler
}

Config provides configuration options for the Init function.

Jump to

Keyboard shortcuts

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