-
Notifications
You must be signed in to change notification settings - Fork 12
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
Discussion: Macros standardization #43
Comments
I though the implementation of these macro would be the same for most of the data sources. Since that's not the case, I think the main benefit och defining them here would be to provide a baseline for what macros to use and what to call them for future sql plugin developers. I've noticed that what you describe as So I think defining the interface for these macros in sqlds would make sense. Regarding |
I guess |
I think this makes sense. Should they be required or optional to implement?
I think it would. |
Yes, I do agree. Having a standard set of macros, which mean the same for the SQL data sources, would be beneficial.
I will send a PR for that.
Probably optional to avoid breaking changes? (even though I'd highly encourage it for new data sources). Thanks for the feedback! |
Hi, I am working on adding macros to a new datasource and it may makes sense to do some refactoring. As far as I can see, all SQL datasources can/should implement the following macros:
The implementation (even the number of args) may differ between different data sources though. Does it makes sense to define those macros here and let the different datasources implement it?
Also, it's necessary a library to convert string durations (e.g.
10ms
) to atime.Duration
. Main grafana has a package for this: https://github.com/grafana/grafana/tree/main/pkg/components/gtime. Should we copy that package here so we can have a standard way of parsing durations (for the$__timeGroup
macro)? (or to the grafana-plugin-sdk-go?)WDYT @sunker @kminehart @yesoreyeram?
The text was updated successfully, but these errors were encountered: