Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing Async Instruments (Observers) from first Metric version #1433

Closed
Oberon00 opened this issue Feb 11, 2021 · 1 comment · Fixed by #1557
Closed

Consider removing Async Instruments (Observers) from first Metric version #1433

Oberon00 opened this issue Feb 11, 2021 · 1 comment · Fixed by #1557
Assignees
Labels
area:api Cross language API specification issue area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory

Comments

@Oberon00
Copy link
Member

Doing async instruments properly seems rather complicated to me (e.g. #1432). If we specify synchronous instruments (especially BatchRecorder) properly, users should be able to implement a functionally equivalent solutions on their own (e.g. with their own background thread). (The only extra thing that might be needed for that is some "last-chance to collect" callback before every export.)

@Oberon00 Oberon00 added spec:metrics Related to the specification/metrics directory area:api Cross language API specification issue area:sdk Related to the SDK labels Feb 11, 2021
@hdost
Copy link

hdost commented Feb 15, 2021

I could agree that for the first version this might be a bit difficult specifically on the SDK side, and while it would definitely be handy to have such primitives in the SDK side of it will likely take some time to experiment more than the synchronous side. There are plenty of edge cases especially with how an async sum would work given:

Asynchronous instruments are expected to record an observation for every label set that it considers "current". This means that asynchronous callbacks are expected to observe a value, even when the value has not changed since the last callback invocation. To not observe a label set implies that a value is no longer current. The Last Value becomes undefined, as it is no longer current, when it is not observed during a collection interval.

Source: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#asynchronous-observations-form-a-current-set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Cross language API specification issue area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants