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

reading plugin settings from environment variable #1160

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yesoreyeram
Copy link
Contributor

This PR adds couple of utility methods to pluginContext which allow you to read plugin settings from environment variable.

This will also ensure the environment variable keys are consistent across the plugins in future. ( example: oracle uses this and azure data explorer uses this )

@yesoreyeram yesoreyeram requested a review from a team as a code owner November 29, 2024 04:39
@yesoreyeram yesoreyeram requested review from wbrowne, andresmgot, oshirohugo and aangelisc and removed request for a team November 29, 2024 04:39
Copy link
Contributor

@andresmgot andresmgot left a comment

Choose a reason for hiding this comment

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

We had an offline conversation about this but as a summary:

  • Using environment variables is the legacy approach so we should defer to use Grafana config instead.
  • The format for env vars should be GF_PLUGIN_<config>.
  • The place to extend the current config passed down to plugins is here in Grafana and here in the plugin SDK for new helper functions.

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