Types
type key
The key part of attribute key-value pairs.
string
type value
The value part of attribute key-value pairs.
This corresponds with the AnyValue type defined in the attribute spec.
Because WIT doesn't support recursive types, the data needs to be serialized. JSON is used as the encoding format.
string
record key-value
A key-value pair describing an attribute.
record resource
An immutable representation of the entity producing telemetry as attributes.
attributes:list<key-value>Attributes that identify the resource.
schema-url:option<string>The schema URL to be recorded in the emitted resource.
record instrumentation-scope
Describes the instrumentation scope that produced telemetry.
name:stringName of the instrumentation scope.
version:option<string>The library version.
schema-url:option<string>Schema URL used by this library. https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
attributes:list<key-value>Specifies the instrumentation scope attributes to associate with emitted telemetry.
WIT
interface types {
/// The key part of attribute `key-value` pairs.
type key = string;
/// The value part of attribute `key-value` pairs.
///
/// This corresponds with the `AnyValue` type defined in the [attribute spec](https://opentelemetry.io/docs/specs/otel/common/#anyvalue).
/// Because WIT doesn't support recursive types, the data needs to be serialized. JSON is used as the encoding format.
type value = string;
/// A key-value pair describing an attribute.
record key-value {
/// The attribute name.
key: key,
/// The attribute value.
value: value,
}
/// An immutable representation of the entity producing telemetry as attributes.
record %resource {
/// Attributes that identify the resource.
attributes: list<key-value>,
/// The schema URL to be recorded in the emitted resource.
schema-url: option<string>,
}
/// Describes the instrumentation scope that produced telemetry.
record instrumentation-scope {
/// Name of the instrumentation scope.
name: string,
/// The library version.
version: option<string>,
/// Schema URL used by this library.
/// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
schema-url: option<string>,
/// Specifies the instrumentation scope attributes to associate with emitted telemetry.
attributes: list<key-value>,
}
}