🏷️ A collection of ScopeMetrics from a Resource.

Groups all metrics from a specific resource (like a turtle, computer, or service). This allows for efficient organization and attribution of metric data.

const turtleResourceMetrics: ResourceMetrics = {
resource: {
attributes: [
{ key: "service.name", value: { stringValue: "turtle-42" } },
{ key: "turtle.type", value: { stringValue: "mining" } },
{ key: "location.world", value: { stringValue: "overworld" } }
],
droppedAttributesCount: 0
},
scopeMetrics: [
// Different scopes for different subsystems
// e.g., mining-operations, navigation, inventory-management
],
schemaUrl: "https://example.com/turtle-schema/v1"
};
interface ResourceMetrics {
    resource: Resource;
    schemaUrl: string;
    scopeMetrics: ScopeMetrics[];
}

Properties

resource: Resource

The resource that produced these metrics

schemaUrl: string

URL to the schema defining the structure of this data

scopeMetrics: ScopeMetrics[]

Array of scope metrics from this resource