* define initial service and add to wire
* update caching service interface
* add skipQueryCache header handler and update metrics query function to use it
* add caching service as a dependency to query service
* working caching impl
* propagate cache status to frontend in response
* beginning of improvements suggested by Lean - separate caching logic from query logic.
* more changes to simplify query function
* Decided to revert renaming of function
* Remove error status from cache request
* add extra documentation
* Move query caching duration metric to query package
* add a little bit of documentation
* wip: convert resource caching
* Change return type of query service QueryData to a QueryDataResponse with Headers
* update codeowners
* change X-Cache value to const
* use resource caching in endpoint handlers
* write resource headers to response even if it's not a cache hit
* fix panic caused by lack of nil check
* update unit test
* remove NONE header - shouldn't show up in OSS
* Convert everything to use the plugin middleware
* revert a few more things
* clean up unused vars
* start reverting resource caching, start to implement in plugin middleware
* revert more, fix typo
* Update caching interfaces - resource caching now has a separate cache method
* continue wiring up new resource caching conventions - still in progress
* add more safety to implementation
* remove some unused objects
* remove some code that I left in by accident
* add some comments, fix codeowners, fix duplicate registration
* fix source of panic in resource middleware
* Update client decorator test to provide an empty response object
* create tests for caching middleware
* fix unit test
* Update pkg/services/caching/service.go
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
* improve error message in error log
* quick docs update
* Remove use of mockery. Update return signature to return an explicit hit/miss bool
* create unit test for empty request context
* rename caching metrics to make it clear they pertain to caching
* Update pkg/services/pluginsintegration/clientmiddleware/caching_middleware.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Add clarifying comments to cache skip middleware func
* Add comment pointing to the resource cache update call
* fix unit tests (missing dependency)
* try to fix mystery syntax error
* fix a panic
* Caching: Introduce feature toggle to caching service refactor (#66323)
* introduce new feature toggle
* hide calls to new service behind a feature flag
* remove licensing flag from toggle (misunderstood what it was for)
* fix unit tests
* rerun toggle gen
---------
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Takes a specific code path for data that identifies itself as dataplane instead of "guessing" what the data is.
The data must identify itself by being in the dataplane by having both the following frame metadata properties:
- TypeVersion property that is greater than 0.0
- 'Type' property
The flag is disableSSEDataplane and disables this functionality and uses the old code for all queries regardless.
See https://github.com/grafana/grafana-plugin-sdk-go/blob/main/data/contract_docs/contract.md for dataplane details.
* Add usage stats about correlations
* Add stats.correlations.count to collected stats
* Expose grafana_stat_totals_correlations metric
* Organize imports
* Correlations: Add documentation
* Add info about the feature toggle and move it to beta
* Remove incorrect bullet point
* Remove a bullet point that is not a step
* Update punctuation
* Update punctuation
* Fix typo
* Fix typo
* Grammar
* Rephrase
* Clarify
* Update transformation.field documentation
* Revert automatic merge formatting
* removes references to CentOS
* starts reorg
* complete restructure
* updates alias
* Update docs/sources/setup-grafana/installation/rpm/index.md
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* incorporates review feedback
* adds install on suse/opensuse
* updates aliases
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* removes start server content from both topics; adds link to start server docs in Next steps
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* incorporates review feedback
* Apply suggestions from code review
* typo fix
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
* Alerting: Remove and revert flag alertingBigTransactions
This is a partial revert of #56575 and a removal of the `alertingBigTransactions` flag.
Real-word use has seen no clear performance incentive to maintain this flag. Lowered db connection count
came at the cost of significant increase in CPU usage and query latency.
* Fix lint backend
* Removed last bits of alertingBigTransactions
---------
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
* tracing: show backend trace ids in frontend
* better trace id naming
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* better trace id naming
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* better trace id naming
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* added feature flag
* bind functionality to the feature flag
* use non-generic name for traceid header
* fixed tests
* loki: do not create empty fields
* do not add empty fields
* fixed graphite test mock data
* added unit-tests to queryResponse
* added unit-tests for backend_srv
* more typescript-friendly check
* added unit-tests for runRequest
---------
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Added note to contact Support
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* makes prettier
* Apply suggestions from code review
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
* Feature Flags: Remove dev-mode from grpc server feature flag
---------
Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* update enhanced-ldap
documenting a potential issue with ldap active sync, when search filter and username attributes do not match.
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* formats example
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
* define 3 feature toggles for rollout phases
* Pass feature toggles along
* Implement first feature toggle
* Try a different strategy with fall-throughs to specific configurations
* Apply toggle overrides once outside of backend composition
* Emit log messages when we coerce backends
* Run code generator for feature toggle files
* Improve wording in flag descs
* Re-run generator
* Use code-generated constants instead of plain strings
* Use converted enum values rather than strings for pre-parsing
* Give more detail and context on http_addr in grafana.ini
This particular configuration item is misleadingly named (it's about networking addresses rather than HTTP) and there are a bunch of ways users can misread, misconfigure, and create a situation where grafana won't start due to a bind error.
I'm trying to outline a couple of extra things about what this covers and provide good default advice, leaving room for specialists who know what they're doing to still use this, with more clarity.
* Update _index.md
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update _index.md
removed recommendation note about http_addr
* makes prettier
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
* enable topnav by default
* rename dashboard-search to dashboard-browse
* wait for time to be set in e2e test before attempting to click button
* update toggle description
* updated all text related to panel actions menu
* removed to do notes and updated intro text for panel inspect
* added screenshot
* added indents
* replaced panel links image and updated intro text
* added missed panel header related updates
* updated panel editor overview image
* chunked out steps per review feedback
* copy edit
* copy edits plus some restructuring
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
* Empty Dashboard state has its own CTA items and its own separate box to choose a library panel to create
* show empty dashboard screen if no panels
* start page for empty dashboard
* add feature flag for empty dashboard redesign
* only show empty dashboard redesign if FF
* tracing: Support multiple OTel propagators
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* tracing: add TraceIDString method to fix up tests
This method will be useful elsewhere if we want to log the trace ID.
* improve propagation docs
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* doc style fix
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* Use tracing.TraceIDFromContext instead of adding TraceIDString method
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Bryan Boreham <bjboreham@gmail.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* docs: add featuretoggle introduction
* update to point to the setting instead
* Update docs/sources/administration/user-management/manage-org-users/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* update text
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* FeatureToggle: Add toggle to use a new way of rotating tokens
* API: Add endpoints to perform token rotation, one endpoint for api request and one endpoint for redirectsd
* Auth: Aling not authorized handling between auth middleware and access
control middleware
* API: add utility function to get redirect for login
* API: Handle token rotation redirect for login page
* Frontend: Add job scheduling for token rotation and make call to token rotation as fallback in retry request
* ContextHandler: Prevent in-request rotation if feature flag is enabled and check if token needs to be rotated
* AuthN: Prevent in-request rotation if feature flag is enabled and check if token needs to be rotated
* Cookies: Add option NotHttpOnly
* AuthToken: Add helper function to get next rotation time and another function to check if token need to be rotated
* AuthN: Add function to delete session cookie and set expiry cookie
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* fix: disable orgrolepicker if externaluser is synced
* add disable to role picker
* just took me 2 hours to center the icon
* wip
* fix: check externallySyncedUser for API call
* remove check from store
* add: tests
* refactor authproxy and made tests run
* add: feature toggle
* set feature toggle for tests
* add: IsProviderEnabled
* refactor: featuretoggle name
* IsProviderEnabled tests
* add specific tests for isProviderEnabled
* fix: org_user tests
* add: owner to featuretoggle
* add missing authlabels
* remove fmt
* feature toggle
* change config
* add test for a different authmodule
* test refactor
* gen feature toggle again
* fix basic auth user able to change the org role
* test for basic auth role
* make err.base to error
* lowered lvl of log and input mesg
* draft changes
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* reworks debian/ubuntu instructions, updates start server topic
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* incorporates feedback; restructures to align with writers toolkit guidelines
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* tweaks structure of server topic; renames directory, corrects relrefs
* corrects spelling
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* removed web parameter
* removes unnecessary word
* incorporates feedback from internal reviewer
* updates alias
* updates alias
* adjust alias
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
* turn on dataConnectionsConsole by default
* change connection feature state to stable
* generate feature toggle files
* increase error threshold for pa11y
* updates windows/mac install topics
* corrects typo
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* tweaks
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update _index.md
I am creating this PR to add more content about the SQLite (the default database for Grafana) limitations. SQLite is fine for small environments but not suitable when monitoring many Dashboards and sending lots of alerts frequently.
For e.g. this issue is just from this week and then got followed up by 3-4 more similar issues (all related to SQLite and are linked with this issue)
Closes#64664
By adding more information, will have less frequency of such issues reported by users.
Also, once this PR get submitted, will also create a new PR about the possible workaround to not get the error message "database locked" while using SQLite.
* Update docs/sources/setup-grafana/installation/_index.md
Thank you. Also, can you please add this link to the High Availablity text as hyperlink.
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/_index.md
* Update docs/sources/setup-grafana/installation/_index.md
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>