public class ClientExportableMetric extends ContextExportableMetric
ClientExportableMetric class extends ContextExportableMetric to process client
metrics telemetry data. It is responsible for organizing resource-level and scope-level
attributes in a Metric/MetricsData payload and ensuring proper formatting for export.| Constructor and Description |
|---|
ClientExportableMetric(io.opentelemetry.proto.metrics.v1.Metric metric,
MetricKey key,
Context context,
io.opentelemetry.proto.resource.v1.Resource clientResource,
Map<String,String> brokerMetricsLabels,
Map<String,String> requestLabels,
Set<String> excludeLabels) |
| Modifier and Type | Method and Description |
|---|---|
io.opentelemetry.proto.metrics.v1.Metric |
metric()
Returns the metric with resource attributes, brokerLabels and requestLabels added to the
metric data point.
|
io.opentelemetry.proto.metrics.v1.ResourceMetrics |
resourceMetrics() |
instrumentationScope, key, resourceequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildMetricsData, buildRequestpublic io.opentelemetry.proto.metrics.v1.Metric metric()
The method first retrieves the base metric from the parent class using
super.getMetric() to get the original metric structure. This original metric is then
enhanced with client-specific attributes by adding them to the metric's data point,
preserving the metric's core data while adding the necessary context for client telemetry.
metric in interface ExportableMetricmetric in class ContextExportableMetricMetric with all resource and scope-level attributes included in its data
pointpublic io.opentelemetry.proto.metrics.v1.ResourceMetrics resourceMetrics()
resourceMetrics in interface ExportableMetricresourceMetrics in class ContextExportableMetricResourceMetrics associated with this ExportableMetric