package csm

import "google.golang.org/grpc/stats/opentelemetry/csm"

Package csm contains utilities for Google Cloud Service Mesh observability.

Index

Functions

func EnableObservability

func EnableObservability(ctx context.Context, options opentelemetry.Options) func()

EnableObservability sets up CSM Observability for the binary globally.

The CSM Stats Plugin is instantiated with local labels and metadata exchange labels pulled from the environment, and emits metadata exchange labels from the peer and local labels. Context timeouts do not trigger an error, but set certain labels to "unknown".

This function is not thread safe, and should only be invoked once in main before any channels or servers are created. Returns a cleanup function to be deferred in main.

Source Files

observability.go pluginoption.go

Version
v1.70.0 (latest)
Published
Jan 23, 2025
Platform
linux/amd64
Imports
15 packages
Last checked
17 hours ago

Tools for package owners.