Skip to content

tracing-opentelemetry calls APIs which are unavailable in wasm32-unknown-unknown #1969

@main--

Description

@main--

tracing-opentelemetry calls SystemTime::now() and Instant::now(). Sadly, these APIs are unavailable when running in browsers on the wasm32-unknown-unknown target. While the time measurements using Instant can be disabled, there is no way to work around the SystemTime issue without patching the crate.

opentelemetry already implements a workaround for SystemTime. The instant crate is a popular replacement for Instant, although it does currently exhibit rather poor ergonomics for downstream users (the output produces a reference to the nodejs env object if no features are selected, which naturally won't work inside a browser).

Metadata

Metadata

Assignees

No one assigned

    Labels

    crate/opentelemetryRelated to the `tracing-opentelemetry` crate.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions