🏷️ Resource represents the entity producing telemetry data.

Describes the source of telemetry data - typically a service, host, or process. This is crucial for identifying and grouping telemetry data in monitoring systems. Based on opentelemetry/proto/resource/v1/resource.proto

const turtleResource: Resource = {
attributes: [
{ key: "service.name", value: { stringValue: "turtle-fleet" } },
{ key: "service.version", value: { stringValue: "1.0.0" } },
{ key: "turtle.id", value: { intValue: 42 } },
{ key: "turtle.type", value: { stringValue: "mining" } },
{ key: "location.world", value: { stringValue: "overworld" } },
{ key: "location.x", value: { intValue: 100 } },
{ key: "location.y", value: { intValue: 64 } },
{ key: "location.z", value: { intValue: 200 } }
],
droppedAttributesCount: 0
};
interface Resource {
    attributes: KeyValue[];
    droppedAttributesCount: number;
}

Properties

attributes: KeyValue[]

Attributes describing the resource

droppedAttributesCount: number

Number of attributes that were dropped due to limits