Documentation ¶
Overview ¶
cloudrun_statshandler adds functionality to the OpenCensus gRPC plugin (go.opencensus.io/plugin/ocgrpc) for Google Cloud, specifically Cloud Run. It may work with other Google Cloud platforms as well.
We provide a wrapper around stats.Handler (google.golang.org/grpc/stats), which does two things: 1. Translates from the Google Cloud Platform trace ID header to the gRPC trace header 2. Adds the Cloud Run revision name to the go.opencensus.io/tag map, so that metrics reported by the OpenCensus gRPC plugin are tagged with it. That enables us to monitor A/B deployments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Key for the opencensus metric tag. OpenCensus stores the tags in a tag map in the // context. The key name must be unique within the tag map. KeyRevisionName = tag.MustNewKey("cloud_run_revision_name") )
Functions ¶
func AddTagKeysToViews ¶
AddTagKeysToViews adds the revision name and location name tags to the the list of go.opencensus.io/stats/view passed in.
Types ¶
This section is empty.