-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat: add system
field to data source instances
#1161
base: main
Are you sure you want to change the base?
Conversation
|
This pull request has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we do not need to update protobuf that would be better
@@ -38,6 +38,7 @@ message DataSourceInstanceSettings { | |||
// The API version when the settings were saved. | |||
// NOTE: this may be an older version than the current apiVersion | |||
string apiVersion = 12; | |||
bool system = 13; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get why you may need this in the UI... but I do not get why the protobuf needs it
What this PR does / why we need it:
This PR proposes to add a
System
field toDataSourceInstanceSettings
, which will be used by Grafana to indicate that the datasource instance should be hidden from view.This PR is a dependency of the functionality here:
system
field to data source instances and types grafana#97315Example uses of "system" data sources
1:n proxies
Sometimes plugin developers need the ability to proxy to multiple services of the same type. By creating multiple data sources, an app plugin can achieve this. The app plugin would need to take responsibility for creating and configuring their system data sources.
General persistence
An additional functionality that hidden datasource instances could provide, is in persist bits of JSON data. In certain environments (like Grafana cloud), the provisioning mechanism will completely rewrite the jsonData of provisioned plugins -- having a data source instantiated allows an app plugin to store some state that will not be automatically deleted in instance refresh.
The desire to make them invisible
Currently data sources can be used to provide the above uses. However, it might not be suitable to view these along with other data sources in typical Grafana views. If there is no need to access these "data sources" in a dashboard, or in the Explore view, adding this "system" flag, a developer can hide these data sources.