-
Notifications
You must be signed in to change notification settings - Fork 55
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
Docs: Enhance datasource READMEs #254
base: main
Are you sure you want to change the base?
Conversation
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.
Some initial comments
Co-authored-by: David Harris <[email protected]>
Co-authored-by: David Harris <[email protected]>
Co-authored-by: David Harris <[email protected]>
Co-authored-by: David Harris <[email protected]>
Co-authored-by: David Harris <[email protected]>
Co-authored-by: David Harris <[email protected]>
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.
Incorporated feedback from reviewers.
I found a PR that dropped off my radar screen. I've incorporated feedback from reviwers. |
|
|
||
This example queries data from an HTTP API. The HTTP API returns data in JSON format, which is then converted to data frames. | ||
|
||
This differs from the `datasource-http` example because the data fetching happens in the plugin backend rather than going through Grafana's data source HTTP proxy. | ||
This plugin differs from the `datasource-http` example because the data fetching happens in the plugin backend rather than going through Grafana's data source HTTP proxy. |
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.
This plugin differs from the `datasource-http` example because the data fetching happens in the plugin backend rather than going through Grafana's data source HTTP proxy. | |
This plugin differs from the `datasource-http` example because the data fetching happens in the plugin backend rather than the front end code fetching through Grafana's data source HTTP proxy. |
|
||
This example queries data from an HTTP API. | ||
This repository contains a data source plugin that uses HTTP through Grafana's data source HTTP proxy. |
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.
This repository contains a data source plugin that uses HTTP through Grafana's data source HTTP proxy. | |
This repository contains a data source plugin that fetches data in the front end through Grafana's data source HTTP proxy. |
This repository contains a data source plugin that uses HTTP through Grafana's data source HTTP proxy. | ||
## Overview | ||
|
||
The Grafana HTTP Data Source Plugin shows the integration of a backend HTTP service as a custom data source within Grafana. This plugin serves as a reference implementation for developers seeking to incorporate HTTP-based data sources into their Grafana dashboards. |
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.
better remove the mention of "backend http service" and simply it call it "API" or "HTTP API" to not confuse people that might think there's backend code in this example.
The Grafana HTTP Data Source Plugin shows the integration of a backend HTTP service as a custom data source within Grafana. This plugin serves as a reference implementation for developers seeking to incorporate HTTP-based data sources into their Grafana dashboards. | |
The Grafana HTTP Data Source Plugin shows the integration of a HTTP API as a custom data source within Grafana. This plugin serves as a reference implementation for developers seeking to incorporate frontend HTTP-based data sources into their Grafana dashboards. |
|
||
Grafana supports a wide range of data sources, including Prometheus, MySQL, and Datadog. There’s a good chance you can already visualize metrics from the systems you have set up. In some cases, though, you already have an in-house metrics solution that you’d like to add to your Grafana dashboards. Grafana data source plugins enable you to integrate such solutions with Grafana. | ||
|
||
This plugin differs from the `datasource-http-backend` example because the data fetching happens through Grafana's data source HTTP proxy rather than going through the plugin backend. |
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.
This plugin differs from the `datasource-http-backend` example because the data fetching happens through Grafana's data source HTTP proxy rather than going through the plugin backend. | |
This plugin differs from the `datasource-http-backend` example because the data fetching happens in the frontend through Grafana's data source HTTP proxy rather than going through the plugin backend. |
npm run dev | ||
``` | ||
|
||
3. Build plugin in production mode: |
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.
We don't need to call for users to run both npm run dev
and npm run build
. We can ask them simply to run npm run build
and that will be it.
These instructions are also missing calling npm run server
which starts a docker container with grafana running the server.
The mockserver required for testing has been included in the Docker Compose file | ||
|
||
Add a new data source in Grafana using the following URL: | ||
``` | ||
http://host.docker.internal:10000/metrics | ||
``` | ||
|
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.
We are missing the instructions to run the docker container so one can see the plugin running npm run server
do we want to add that?
```bash | ||
$ npm install | ||
$ npm run build |
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.
We are missing the instructions to run the docker container so one can see the plugin running npm run server
do we want to add that?
|
||
## Build | ||
The plugin connects to the backend through a streaming connection and the backend establishes a connection to an external WebSocket server. |
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.
This whole sentence is strange
The plugin connects to the backend through a streaming connection and the backend establishes a connection to an external WebSocket server. | |
The plugin frontend connects to the backend through with a websocket and the backend establishes a connection to an external server. |
@@ -15,7 +20,7 @@ npm install | |||
npm run build | |||
``` | |||
|
|||
and run the Grafana and the example websocket server with Docker compose: | |||
2. Run the Grafana and the example WebSocket server with Docker compose: | |||
|
|||
```sh | |||
cd streaming-backend-websocket-plugin |
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.
wrong path
cd streaming-backend-websocket-plugin | |
cd websocket-server |
@@ -15,7 +20,7 @@ npm install | |||
npm run build | |||
``` | |||
|
|||
and run the Grafana and the example websocket server with Docker compose: | |||
2. Run the Grafana and the example WebSocket server with Docker compose: |
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.
This doesn't run grafana. only the websocket server
2. Run the Grafana and the example WebSocket server with Docker compose: | |
2. Run the example WebSocket server with Docker compose: |
@@ -15,7 +20,7 @@ npm install | |||
npm run build |
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.
npm run build | |
npm run build | |
npm run server |
## Build | ||
## Overview | ||
|
||
The Streaming WebSocket Data Source Plugin illustrates the integration of WebSocket-based data sources into Grafana dashboards. This plugin serves as a reference implementation for developers aiming to incorporate real-time streaming data into their Grafana visualizations. |
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.
The Streaming WebSocket Data Source Plugin illustrates the integration of WebSocket-based data sources into Grafana dashboards. This plugin serves as a reference implementation for developers aiming to incorporate real-time streaming data into their Grafana visualizations. | |
The Frontend Streaming WebSocket Data Source Plugin illustrates the integration of WebSocket-based data sources into Grafana dashboards. This plugin serves as a reference implementation for developers aiming to incorporate real-time streaming data into their Grafana visualizations. |
|
||
The Streaming WebSocket Data Source Plugin illustrates the integration of WebSocket-based data sources into Grafana dashboards. This plugin serves as a reference implementation for developers aiming to incorporate real-time streaming data into their Grafana visualizations. | ||
|
||
This server returns random numeric values at random intervals. |
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.
Which server?
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.
Thanks @josmperez for all the work in these READMEs but there's some work to be done:
- We need to make sure all READMEs we are modifying are following the same format and contain the same amount of instructions. For example many examples call to run
npm run server
and some not. Some call to run the e2e tests as part of the instructions to "get started" but there's no reason at all to run the e2e tests if you want to run the example. - We must mention frontend and backend likewise to make sure people understand examples that are frontend-oriented and backend-oriented. specially in data sources.
- There's this sentence we throw aroung sometimes
Grafana supports a wide range of data sources, including Prometheus, MySQL, and even Datadog. There’s a...
that doesn't really fit in an example readme (IMO). but we don't consistently use it. Let's either put it everywhere or remove it. - In the places we mention
Grafana's data source HTTP proxy
we must mention that the request happens in the frontend and THEN goes through the data source http proxy. So it is clear this is not a custom backend component.
There are a few places where the text is out of context or just not related at all with th example README. I wrote individual comments about those I found but there might be more.
I'm happy to take another look at this PR and make the requested changes; however, recently at the offsite we discussed long-term plans that would involve removing many of these examples. For this reason, I'd like to pause work on this until I've had a chance to re-prioritize. |
Enhance READMEs for datasource plugins. Note that installation information was missing for a few of these plugins and I have drafted some content based on similar plugins, but this needs to be checked for accuracy.