cloudtrace

package
v0.0.0-...-98cd694 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Unlicense Imports: 10 Imported by: 0

Documentation

Overview

Package cloudtrace provides common functions for attaching values to trace spans

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupCloudTrace

func SetupCloudTrace(ctx context.Context, cfg *Config) (tracing.TracerProvider, error)

SetupCloudTrace creates a new trace provider instance and registers it as global trace provider.

Types

type Config

type Config struct {
	ProjectID                 string  `json:"projectID,omitempty"                 toml:"project_id,omitempty"`
	ServiceName               string  `json:"service_name,omitempty"              toml:"service_name,omitempty"`
	SpanCollectionProbability float64 `json:"spanCollectionProbability,omitempty" toml:"span_collection_probability,omitempty"`
	// contains filtered or unexported fields
}

Config contains settings related to tracing.

func (*Config) ValidateWithContext

func (c *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates the config struct.

Jump to

Keyboard shortcuts

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