Skip to content
Effect Days 2026 Get your ticket

OtlpResource

12 exports Added in v1.0.0 Source

Attributes

Signature

declare function entriesToAttributes(entries: Iterable<[string, unknown]>): Array<KeyValue>

Signature

declare function unknownToAttributeValue(value: unknown): AnyValue

Signature

declare function unsafeServiceName(resource: Resource): string

Constructors

fromConfig

Added in v1.0.0 Source

Signature

declare const fromConfig: (options?: {
readonly attributes?: Record<string, unknown>;
readonly serviceName?: string;
readonly serviceVersion?: string;
}) => Effect.Effect<Resource>

make

Added in v1.0.0 Source

Signature

declare function make(options: {
readonly attributes?: Record<string, unknown>;
readonly serviceName: string;
readonly serviceVersion?: string;
}): Resource

Models

AnyValue interface

Added in v1.0.0 Source

Signature

interface AnyValue {
arrayValue?: ArrayValue;
boolValue?: boolean | null;
bytesValue?: Uint8Array<ArrayBufferLike>;
doubleValue?: number | null;
intValue?: number | null;
kvlistValue?: KeyValueList;
stringValue?: string | null;
}

ArrayValue interface

Added in v1.0.0 Source

Signature

interface ArrayValue {
values: Array<AnyValue>;
}

Fixed64 type

Added in v1.0.0 Source

Signature

type Fixed64 = LongBits | string | number

KeyValue interface

Added in v1.0.0 Source

Signature

interface KeyValue {
key: string;
value: AnyValue;
}

KeyValueList interface

Added in v1.0.0 Source

Signature

interface KeyValueList {
values: Array<KeyValue>;
}

LongBits interface

Added in v1.0.0 Source

Signature

interface LongBits {
high: number;
low: number;
}

Resource interface

Added in v1.0.0 Source

Signature

interface Resource {
attributes: Array<KeyValue>;
droppedAttributesCount: number;
}