Skip to content

Node.js: span.end(timestamp) requires millisecond epoch #18697

@timfish

Description

@timfish

Description

When creating spans via startSpan, startManualSpan, etc, startTime is in seconds since epoch but on Node.js, span.end(timestamp) expects a millisecond epoch. Using mixed timestamp units is very confusing and I lost a couple of hours to this! The jsdocs for all timestamp based arguments are not clear what kind of timestamp should be used.

As far as I can tell, this impacts all SDKs using Open Telemetry and so means the SDKs actually differ over what kind of timestamp they support. The browser SDKs support either second or millisecond epochs.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions