Skip to content

Consider changes to timeouts for asynchronous metrics #1897

@kaylareopelle

Description

@kaylareopelle

@wsmoak brought up some great points about the timeout behavior for asynchronous metrics in #1877.

Some things to ponder:

  1. Currently, the asynchronous timeout is using Ruby's Timeout class, which operates in seconds. OTel exporter timeouts use milliseconds. Should we change the implementation to use milliseconds? Regardless, we should update the documentation to be clearer about the required unit.

  2. Does the spec allow timeouts to be set for an asynchronous instrument on creation? Are any other implementations doing this? We should consider whether attributes could also be set on instrument creation.

From #1877:

I left a comment on wsmoak@309c129#r164094574

I am confused by the need to set the timeout and attributes separately after creating the observable gauge.

And why you do that by calling observe on the just-created instrument. (Which does, actually, record an observation, in addition to setting the attributes for observations going forward.)

It seems like those could just be supplied when you create it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions