Skip to content

Commit

Permalink
better example
Browse files Browse the repository at this point in the history
  • Loading branch information
PietroPasotti committed Dec 4, 2024
1 parent 0949481 commit 5e2e3a5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
"GrafanaDatasource": {
"properties": {
"type": {
"description": "Type of the datasource.",
"description": "Type of the datasource, typically one of https://grafana.com/docs/grafana/latest/datasources/#built-in-core-data-sources.",
"examples": [
"tempo",
"loki",
"prometheus"
"prometheus",
"elasticsearch"
],
"title": "Type",
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
"GrafanaDatasource": {
"properties": {
"type": {
"description": "Type of the datasource.",
"description": "Type of the datasource, typically one of https://grafana.com/docs/grafana/latest/datasources/#built-in-core-data-sources.",
"examples": [
"tempo",
"loki",
"prometheus"
"prometheus",
"elasticsearch"
],
"title": "Type",
"type": "string"
Expand Down
4 changes: 2 additions & 2 deletions interfaces/grafana_datasource_exchange/v0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ The requirer and the provider need to adhere to a certain set of criteria to be
- Is expected to register each datasource endpoint (one per unit) with a central grafana application and obtain a Datasource UID for each one of them.
- Is expected to share via application data, as a json-encoded array (sorted by UID), the following information:
- for each datasource (which technically will likely mean, for each unit of the application):
- the datasource UID
- the datasource type
- the datasource UID: an arbitrary string, that is expected to be unique for the grafana instance
- the datasource type: a grafana datasource type name (typically will be [one of the built-in ones](https://grafana.com/docs/grafana/latest/datasources/#built-in-core-data-sources))

To avoid complexity, we stipulate that the data will be provided in bulk: only 'fully specified' datasources will be shared, i.e. this is not a valid databag state:

Expand Down
5 changes: 3 additions & 2 deletions interfaces/grafana_datasource_exchange/v0/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@


class GrafanaDatasource(BaseModel):
type: str = Field(description="Type of the datasource.",
examples=['tempo', 'loki', 'prometheus'])
type: str = Field(description="Type of the datasource, typically one of "
"https://grafana.com/docs/grafana/latest/datasources/#built-in-core-data-sources.",
examples=["tempo", "loki", "prometheus", "elasticsearch"])
uid: str = Field(description="Grafana datasource UID, as assigned by Grafana.")


Expand Down

0 comments on commit 5e2e3a5

Please sign in to comment.