🔬 A collection of Metrics produced by a Scope.

Groups metrics by instrumentation scope (like a specific library or module). This helps organize metrics by their source within a service.

const miningOperationsMetrics: ScopeMetrics = {
scope: {
name: "mining-operations",
version: "2.1.0",
attributes: [
{ key: "module.type", value: { stringValue: "core" } }
],
droppedAttributesCount: 0
},
metrics: [
{
name: "blocks_mined_total",
description: "Total number of blocks mined",
unit: "blocks",
sum: {
dataPoints: [
{
attributes: [
{ key: "block.type", value: { stringValue: "minecraft:diamond_ore" } }
],
startTimeUnixNano: "1640995200000000000",
timeUnixNano: "1640995260000000000",
asInt: 42,
exemplars: [],
flags: 0
}
],
aggregationTemporality: AggregationTemporality.CUMULATIVE,
isMonotonic: true
},
metadata: []
}
],
schemaUrl: ""
};
interface ScopeMetrics {
    metrics: Metric[];
    schemaUrl: string;
    scope: InstrumentationScope;
}

Properties

metrics: Metric[]

Array of metrics from this scope

schemaUrl: string

URL to the schema defining the structure of this data

The instrumentation scope that produced these metrics