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 \ OpenTelemetryMethods
__construct
| Parameters | |
|---|---|
| Name | Description |
client |
Google\Cloud\Monitoring\V3\Client\MetricServiceClient
The monitoring client. |
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 |
|