-
Notifications
You must be signed in to change notification settings - Fork 893
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
Clarify MetricReader collect result #2295
Comments
It seems like this may be a good use of something akin to "stale" metric points for these async instruments that fail. The issue with that is you really don't know what My $.02 here is that we should focus on uses of the return status of MetricReader to resolve this, and look at back-end usages. Regarding failed async reads and backend concerns:
Now, for in-process handling of this status code, what do we expect on partial collection failures?
I think Option 3 is totally fine. Option 4 is too hard to get right given the API, but ideally we'd work our ways towards Option 2. For JavaScript - What are various ways you've interacted with MetricReader.Collect return value? |
I think Option 2 with mere count doesn't help in the condition too much. It didn't report which metric collection failed nor why it fails.
+1, we can already find out that points are missing with current backends, I'd think diagnostic logging with the detailed errors can be more helpful.
In JavaScript, as the operation interface MetricCollectionResult {
failedCount: number;
data: MetricData[];
} It can reshape depending on what the spec is defined. |
Ping @open-telemetry/specs-metrics-approvers |
What are you trying to achieve?
When implementing MetricReader.Collect, the spec is said:
In JavaScript implementation, the timeout is only meaningful on the async instrument callback context. Synchronous instruments collection can not be interrupted or fail (if the SDK is implemented correctly). That is said, async instruments may time out or fail, but synchronous instruments always can be collected without failure. So to JavaScript implementation, it can do its best to collect metric instruments and inform the MetricReader that some instruments collection failed, but here you can still get part of the result.
However, the spec has no words on if the implementations should achieve a greater availability on collection.
The text was updated successfully, but these errors were encountered: