azure-docs-sdk-java/docs-ref-autogen/com.azure.core.util.metrics...

45 строки
3.1 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.core.util.metrics.LongGauge"
fullName: "com.azure.core.util.metrics.LongGauge"
name: "LongGauge"
nameWithType: "LongGauge"
summary: "A counter instrument that records `long` values."
syntax: "public interface **LongGauge**"
methods:
- uid: "com.azure.core.util.metrics.LongGauge.isEnabled()"
fullName: "com.azure.core.util.metrics.LongGauge.isEnabled()"
name: "isEnabled()"
nameWithType: "LongGauge.isEnabled()"
summary: "Flag indicating if metric implementation is detected and functional, use it to minimize performance impact associated with metrics, e.<wbr>g."
modifiers:
- "abstract"
syntax: "public abstract boolean isEnabled()"
desc: "Flag indicating if metric implementation is detected and functional, use it to minimize performance impact associated with metrics, e.g. measuring latency."
returns:
description: "<code>true</code> if enabled, <code>false</code> otherwise"
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.util.metrics.LongGauge.registerCallback(java.util.function.Supplier<java.lang.Long>,com.azure.core.util.TelemetryAttributes)"
fullName: "com.azure.core.util.metrics.LongGauge.registerCallback(Supplier<Long> valueSupplier, TelemetryAttributes attributes)"
name: "registerCallback(Supplier<Long> valueSupplier, TelemetryAttributes attributes)"
nameWithType: "LongGauge.registerCallback(Supplier<Long> valueSupplier, TelemetryAttributes attributes)"
summary: "Registers callbacks to obtain measurements."
modifiers:
- "abstract"
parameters:
- description: "Callback that will periodically be requested to obtain current value."
name: "valueSupplier"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html\">Supplier</a>&lt;<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html\">Long</a>&gt;"
- description: "Collection of attributes representing metric dimensions. Caller that wants to\n record dynamic attributes, should register callback per each attribute combination."
name: "attributes"
type: "<xref href=\"com.azure.core.util.TelemetryAttributes?alt=com.azure.core.util.TelemetryAttributes&text=TelemetryAttributes\" data-throw-if-not-resolved=\"False\" />"
syntax: "public abstract AutoCloseable registerCallback(Supplier<Long> valueSupplier, TelemetryAttributes attributes)"
desc: "Registers callbacks to obtain measurements. Make sure to close result to stop reporting metric."
returns:
description: "instance of <xref uid=\"java.lang.AutoCloseable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AutoCloseable\"></xref> subscription."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html\">AutoCloseable</a>"
type: "interface"
desc: "A counter instrument that records `long` values.\n\nCounters only allow adding positive values, and guarantee the resulting metrics will be always-increasing monotonic sums."
metadata: {}
package: "com.azure.core.util.metrics"
artifact: com.azure:azure-core:1.52.0