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

feat: add system field to data source instances #1161

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

darrenjaneczek
Copy link

@darrenjaneczek darrenjaneczek commented Dec 2, 2024

What this PR does / why we need it:

This PR proposes to add a System field to DataSourceInstanceSettings, 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:

Example 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.

@CLAassistant
Copy link

CLAassistant commented Dec 2, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants