Skip to content

Fix error source coming from getFrames function #142

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

Merged
merged 4 commits into from
Nov 8, 2024

Conversation

ivanahuckova
Copy link
Member

@ivanahuckova ivanahuckova commented Nov 6, 2024

Fixes https://github.com/grafana/data-sources/issues/161
Follows up on grafana/grafana-plugin-sdk-go#1134

This PR fixes error source for errors coming from getFrames function from sdk. It specifically checks for exported errors that we consider downstream from data package in sdk and http downstream errors.

image

@ivanahuckova ivanahuckova requested a review from a team as a code owner November 6, 2024 14:42
@CLAassistant
Copy link

CLAassistant commented Nov 6, 2024

CLA assistant check
All committers have signed the CLA.

@ivanahuckova ivanahuckova requested a review from a team November 6, 2024 14:43
q.metrics.CollectDuration(SourcePlugin, StatusError, time.Since(start).Seconds())
// We default to plugin error source
errSource := status.SourcePlugin
if backend.IsDownstreamHTTPError(err) || isProcessingDownstreamError(err) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. does sqlds uses http transport/http based error codes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there are sometimes some context canceled/timeout error which are all covered in IsDownstreamHTTPError.

Copy link
Contributor

@yesoreyeram yesoreyeram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ivanahuckova ivanahuckova merged commit aacfeb3 into main Nov 8, 2024
4 checks passed
@ivanahuckova ivanahuckova deleted the ivana/check-downstream-processing-errors branch November 8, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants