This adds a version of the SQLStore that includes a ReadReplica. The primary DB can be accessed directly - from the caller's standpoint, there is no difference between the SQLStore and ReplStore unless they wish to explicitly call the ReadReplica() and use that for the DB sessions.
Currently only the stats service GetSystemStats and GetAdminStats are using the ReadReplica(); if it's misconfigured or if the databaseReadReplica feature flag is not turned on, it will fall back to the usual (SQLStore) behavior.
Testing requires a database and read replica - the replication should already be configured. I have been testing this locally with a docker mysql setup (https://medium.com/@vbabak/docker-mysql-master-slave-replication-setup-2ff553fceef2) and the following config:
[feature_toggles]
databaseReadReplica = true
[database]
type = mysql
name = grafana
user = grafana
password = password
host = 127.0.0.1:3306
[database_replica]
type = mysql
name = grafana
user = grafana
password = password
host = 127.0.0.1:3307
* Use ref URIs with the reference style links
If I remember correctly, the UI needs reference style links so it can substitute its own link destinations.
ref URIs work both inline and as the destination for reference style links.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove unused ref URI
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove unused Data frames link
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Updated table wrapping and auto wording
* Fixed formatting to match other lists
* Fixed admonition styling and moved content out of note into body
* Added note re feature toggle
* Fixed typo
* Added comma
Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
---------
Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
* Update description of Grafana OSS
Reorder info and change examples to include only OSS data sources
* ran prettier
---------
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
* Update index.md on Node panels to Grafana Play link
* Update index.md add Traces docs link to Grafana Play
* Update index.md News documentation link to Grafana Play
* Update index.md Alert list documentation link to Grafana Play
* Update index.md Alert list fixed missing link
* Update index.md Fixed title
* Update index.md Trying code fix
* Ran prettier command
* Matched link text to dashboard titles
* Replaced URL with ref URI key
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
* Docs: Update "Configure high availability" guide with ha_reconnect_timeout configuration
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Docs: landing page for OSS/Enterprise
* adds alt text for image in alerting
* Update docs/sources/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* changes according to jacks feedback
* more fixes
* ran prettier
* adds upgrade tile
* adds better description
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Auth: Implement org role mapping for google oauth provider
* Update docs
* Remove unused function
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Update types
* Mark datasource as supporting traces
* Add logic to transform exemplar query to traces query
* Render appropriate editor
* Run trace query for exemplars
* Refactor out common functions
- Add function to retrieve first/default subscription
* Add route for trace exemplars
* Update logic to appropriately query exemplars
* Update traces query builder
* Update instance test
* Remove unneeded import
* Set traces pseudo data source
* Replace deprecated function calls
* Add helper for setting default traces query
* Don't show resource field for exemplars query
* When resetting operation ID for exemplars set query to default
- Update tests
* Update query header to appropriately set the service value
* Fix response frame creation and update tests
* Correctly select resource
* Convert subscriptionsApiVersion to const
* Add feature toggle
* Conf: Add org_mapping and org_attribute_path to github and gitlab conf
* Gitlab: Implement org role mapping
* Update docs
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>