🏷️ 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"}; Copy
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"};
The resource that produced these metrics
URL to the schema defining the structure of this data
Array of scope metrics from this resource
🏷️ 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.
Example