Cloud Spanner Client - Class MetricsExporter (2.9.0)

Reference documentation and code samples for the Cloud Spanner Client class MetricsExporter.

MetricsExporter exports Spanner client metrics to Google Cloud Monitoring using the internal service endpoint.

Namespace

Google \ Cloud \ Spanner \ OpenTelemetry

Methods

__construct

Parameters
Name
Description
projectId
string

The GCP project ID metrics will be written to.

clientUid
string

The unique client identifier.

timeoutMillis
int

The timeout defined for the metrics client during export.

export

Exports a batch of OTel metrics to Cloud Monitoring.

Parameter
Name
Description
batch
iterable<\opentelemetry\sdk\metrics\data\metric>
Returns
Type
Description
bool

forceFlush

Implementation of the forcePush method for PushMetricExporter interface.

Returns
Type
Description
true

shutdown

Implementation of the shutdown method for PushMetricExporterInterface.

Returns
Type
Description
true

temporality

Returns the aggregation temporality for the given metric.

Parameter
Name
Description
metadata
OpenTelemetry\SDK\Metrics\MetricMetadataInterface
Returns
Type
Description
string
Create a Mobile Website
View Site in Mobile | Classic
Share by: