GeezerVison is showing adk.dev — AuthenticatedMetricExporter | ADK for TypeScript: API Reference - v2.5.0
- AuthenticatedMetricExporter
Class AuthenticatedMetricExporter
Authenticated OTLP metric exporter wrapper sending metrics to Google Cloud.
Constructors
constructor
-
new AuthenticatedMetricExporter( auth: GoogleAuth, endpoint: string, userAgentHeaders?: Record<string, string>,): AuthenticatedMetricExporter
Parameters
- auth: GoogleAuth
- endpoint: string
- userAgentHeaders: Record<string, string> = {}
Returns AuthenticatedMetricExporter
Methods
export
-
export( metrics: ResourceMetrics, resultCallback: (result: { code: number; error?: Error }) => void,): void
Exports metrics to Google Cloud.
Parameters
- metrics: ResourceMetrics
- resultCallback: (result: { code: number; error?: Error }) => void
Callback called with the export result.
Returns void
forceFlush
-
forceFlush(): Promise<void>
selectAggregationTemporality
-
selectAggregationTemporality( instrumentType: InstrumentType,): AggregationTemporality
Selects aggregation temporality for instrument type.
Parameters
- instrumentType: InstrumentType
Returns AggregationTemporality
shutdown
-
shutdown(): Promise<void>
Shuts down the metric exporter.
Returns Promise<void>