Modifier and Type | Method and Description |
---|---|
static Iterable<io.opentelemetry.proto.common.v1.KeyValue> |
asAttributes(Map<String,String> labels) |
static SinglePointMetric |
create(MetricKey metricKey,
io.opentelemetry.proto.metrics.v1.Metric.Builder metric) |
static SinglePointMetric |
deltaSum(MetricKey metricKey,
double value,
boolean monotonic,
Instant timestamp,
Instant startTimestamp) |
static SinglePointMetric |
deltaSum(MetricKey metricKey,
long value,
boolean monotonic,
Instant timestamp,
Instant startTimestamp) |
static SinglePointMetric |
gauge(MetricKey metricKey,
double value,
Instant timestamp) |
static SinglePointMetric |
gauge(MetricKey metricKey,
long value,
Instant timestamp) |
static SinglePointMetric |
gauge(MetricKey metricKey,
Number value,
Instant timestamp)
creates a metric data point for arbitrary Number values.
|
MetricKey |
key() |
io.opentelemetry.proto.metrics.v1.Metric.Builder |
metric() |
static SinglePointMetric |
sum(MetricKey metricKey,
double value,
boolean monotonic,
Instant timestamp) |
static SinglePointMetric |
sum(MetricKey metricKey,
double value,
boolean monotonic,
Instant timestamp,
Instant startTimestamp) |
static SinglePointMetric |
sum(MetricKey metricKey,
long value,
boolean monotonic,
Instant timestamp) |
static SinglePointMetric |
sum(MetricKey metricKey,
long value,
boolean monotonic,
Instant timestamp,
Instant startTimestamp) |
public io.opentelemetry.proto.metrics.v1.Metric.Builder metric()
public static SinglePointMetric create(MetricKey metricKey, io.opentelemetry.proto.metrics.v1.Metric.Builder metric)
public static Iterable<io.opentelemetry.proto.common.v1.KeyValue> asAttributes(Map<String,String> labels)
public static SinglePointMetric gauge(MetricKey metricKey, Number value, Instant timestamp)
Long / Integer -> long All other Number types -> double
For fine-grained control, use point(Instant, long)
and point(Instant, double)
metricKey
- value
- timestamp
- public static SinglePointMetric gauge(MetricKey metricKey, long value, Instant timestamp)
public static SinglePointMetric gauge(MetricKey metricKey, double value, Instant timestamp)
public static SinglePointMetric deltaSum(MetricKey metricKey, long value, boolean monotonic, Instant timestamp, Instant startTimestamp)
public static SinglePointMetric deltaSum(MetricKey metricKey, double value, boolean monotonic, Instant timestamp, Instant startTimestamp)
public static SinglePointMetric sum(MetricKey metricKey, long value, boolean monotonic, Instant timestamp)
public static SinglePointMetric sum(MetricKey metricKey, double value, boolean monotonic, Instant timestamp)
public static SinglePointMetric sum(MetricKey metricKey, long value, boolean monotonic, Instant timestamp, Instant startTimestamp)
public static SinglePointMetric sum(MetricKey metricKey, double value, boolean monotonic, Instant timestamp, Instant startTimestamp)