Documentation ¶
Overview ¶
Package gcpmetric implements a metric.Saver that records metrics with Google's Cloud Trace API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSaver ¶
NewSaver returns a metric.Saver that saves metrics to GCP Traces for a GCP projectID. The caller must have enabled the StackDriver Traces API for the projectID and have sufficient permission to use the scope "cloud-platform".
A random sampling ratio of 1-to-n is taken. Setting n to 1 reports every event.
A maximum number of outbound network requests per second (maxQPS) when uploading metrics to the GCP backend is enforced. Values equal to or larger than 1000 mean unlimited.
An optional set of string key-value pairs can be given and they will be saved as labels on GCP. They are useful, for example, in the case of differentiating a metric coming from a test instance versus production.
Types ¶
This section is empty.