Skip to content

Conversation

@minatoaquaMK2
Copy link
Contributor

This commit updates the Grafana dashboard configuration to include a datasource template variable. This allows users to dynamically select the datasource directly within the Grafana dashboard, improving flexibility and user experience.

Title

Enable datasource selection via templating

Relevant issues

N/A (This introduces a new feature)

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on (make test-unit)[https://docs.litellm.ai/docs/extras/contributing_code]
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature

Changes

This Pull Request introduces a new feature to the Grafana dashboard configuration, enabling users to dynamically select the datasource directly within the dashboard. This is achieved by adding a datasource template variable (e.g., $datasource) to the dashboard configuration. Subsequently, the panel configurations that utilize the datasource are updated to reference this template variable.

Before:
image

After:
image

Benefits:

  • Increased Flexibility: Users can now switch between datasources on the dashboard without modifying configuration files, improving adaptability across different environments (development, testing, production).
  • Improved User Experience: The ability to select datasources via a user-friendly dropdown menu enhances the overall experience.
  • Simplified Management: This reduces the need to maintain multiple dashboard configurations tailored to specific datasources.

Testing:

  • Successfully tested the addition of the $datasource template variable on a local Grafana instance.
  • Verified that dashboard panels correctly display data after selecting different datasources via the template variable.
This commit updates the Grafana dashboard configuration to include a datasource template variable. This allows users to dynamically select the datasource directly within the Grafana dashboard, improving flexibility and user experience.
@vercel
Copy link

vercel bot commented Apr 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2025 3:30am
@CLAassistant
Copy link

CLAassistant commented Apr 24, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

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

Can you select a DS and show the filled in data to confirm it's working

@minatoaquaMK2
Copy link
Contributor Author

@minatoaquaMK2
Copy link
Contributor Author

image

Copy link
Contributor

@ishaan-jaff ishaan-jaff left a comment

Choose a reason for hiding this comment

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

LGTM

@ishaan-jaff
Copy link
Contributor

@minatoaquaMK2 please sign the CLA so we can merge

@minatoaquaMK2
Copy link
Contributor Author

@ishaan-jaff Thank you for the review. I have signed the CLA.

@ishaan-jaff ishaan-jaff merged commit 65b99d6 into BerriAI:main Apr 25, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants