Skip to content

Commit 5a9de01

Browse files
committed
feat(factor-otel): refactoring WIT and updating conversions
Signed-off-by: Andrew Steurer <94206073+asteurer@users.noreply.github.com>
1 parent ed8713c commit 5a9de01

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

crates/world/src/conversions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,8 @@ mod otel {
590590
impl From<wasi_metrics::Resource> for opentelemetry_sdk::Resource {
591591
fn from(value: wasi_metrics::Resource) -> Self {
592592
let attributes: Vec<opentelemetry::KeyValue> =
593-
value.inner.attributes.into_iter().map(Into::into).collect();
594-
let schema_url: Option<String> = value.inner.schema_url.into();
593+
value.attributes.into_iter().map(Into::into).collect();
594+
let schema_url: Option<String> = value.schema_url.into();
595595

596596
match schema_url {
597597
Some(url) => opentelemetry_sdk::resource::Resource::builder()

wit/deps/otel/metrics.wit

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ interface metrics {
2020

2121
/// An immutable representation of the entity producing telemetry as attributes.
2222
record %resource {
23-
inner: resource-inner,
24-
}
25-
26-
/// Inner structure of `resource` holding the actual data.
27-
record resource-inner {
2823
attributes: list<key-value>,
2924
schema-url: option<string>,
3025
}
@@ -215,7 +210,7 @@ interface metrics {
215210

216211
/// A measurement sampled from a time series providing a typical example.
217212
record exemplar {
218-
/// The attributes recorded with the measurement but filtered out of the
213+
/// The attributes recorded with the measurement but filtered out of the
219214
/// time series' aggregated data.
220215
filtered-attributes: list<key-value>,
221216
/// The time when the measurement was recorded.

0 commit comments

Comments
 (0)