grafana/pkg/api
Marcus Efraimsson caa420f92f
Chore: Improve request distributed tracing middleware (#33033)
Before these changes the request tracing was added for each route 
registered using the routing.RouteRegister, see code. This had the 
consequence that middleware executed earlier/later in the request 
pipeline was not part of the request tracing middleware life-cycle 
which measures the duration of requests among other things.
In the logger middleware we do extract the current distributed trace 
identifier, if available, and set that on request info/error log messages.
With these changes we can extract the current distributed trace identifier, 
if available, and set that on the contextual HTTP request logger 
(models.ReqContext.Logger) which would improve the possibility to correlate 
all HTTP request log messages with traces.
In addition, the request tracing middleware is now executed first and last in 
the request pipeline and should therefore result in more accurate timing 
measurements (request duration).

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-04-20 15:22:22 +02:00
..
avatar Backend: Migrate to using non-global configuration (#31856) 2021-03-10 12:41:29 +01:00
datasource Chore: Remove unused Go code (#28852) 2020-11-17 11:51:31 +01:00
dtos Access control: expose permissions to the frontend (#32954) 2021-04-16 16:02:16 +03:00
frontendlogging PluginManager: Make remaining plugin state non-global (#32094) 2021-03-18 13:53:01 +01:00
pluginproxy Allows posting to prom rules endpoints via ds_proxy (#32946) 2021-04-14 13:06:20 -04:00
response [Alerting] Forking LoTex ruler (#32138) 2021-03-19 10:32:13 -04:00
routing Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
static API: Fix paths starting with double leading slash or slash and backslash (#32830) 2021-04-09 11:49:38 +02:00
acl.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
admin_provisioning.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
admin_users_test.go Chore: Replace Command dispatches by explicit calls (#32131) 2021-03-19 09:14:14 +01:00
admin_users.go Chore: Replace Command dispatches by explicit calls (#32131) 2021-03-19 09:14:14 +01:00
admin.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
alerting_test.go Search: add sort information in dashboard results (#30609) 2021-02-11 08:49:16 +01:00
alerting.go Introduce TSDB service (#31520) 2021-03-08 07:02:49 +01:00
annotations_test.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
annotations.go API: Return 400 on invalid Annotation requests (#32429) 2021-03-29 15:47:16 +02:00
api.go Access control: Add access control based permissions to admins/users (#32409) 2021-04-14 16:31:27 +02:00
apikey.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
app_routes.go PluginManager: Make remaining plugin state non-global (#32094) 2021-03-18 13:53:01 +01:00
basic_auth_test.go Chore: Use Header.Set method instead of Header.Add (#29804) 2020-12-14 15:13:01 +01:00
basic_auth.go Chore: Start harmonizing linting with plugin SDK (#25854) 2020-06-29 14:08:32 +02:00
common_test.go Auth: support JWT Authentication (#29995) 2021-03-31 08:40:44 -07:00
dashboard_permission_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
dashboard_permission.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
dashboard_snapshot_test.go API: add ID to snapshot API responses (#29600) 2020-12-04 16:22:58 +01:00
dashboard_snapshot.go API Response implements http.ResponseWriter (#32046) 2021-03-17 13:12:28 -04:00
dashboard_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
dashboard.go Plugins: Allow a non-dashboard page to be the default home page (#32926) 2021-04-13 15:27:51 +02:00
dataproxy.go Data Source Proxy: Migrate proxy to its own service and make more extensible (#31927) 2021-03-17 13:10:40 -04:00
datasources_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
datasources.go API: Return 409 on datasource version conflict (#32425) 2021-03-29 16:03:15 +02:00
fakes.go PluginManager: Make remaining plugin state non-global (#32094) 2021-03-18 13:53:01 +01:00
folder_permission_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
folder_permission.go [Alerting]: Several modifications in alert rules (#32983) 2021-04-15 15:54:37 +03:00
folder_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
folder.go [Alerting]: Several modifications in alert rules (#32983) 2021-04-15 15:54:37 +03:00
frontend_logging_test.go PluginManager: Make remaining plugin state non-global (#32094) 2021-03-18 13:53:01 +01:00
frontend_logging.go Logging: sourcemap support for frontend stacktraces (#30590) 2021-02-04 08:37:28 +02:00
frontend_metrics.go FrontendMetrics: Adds new backend api that frontend can use to push frontend measurements and counters to prometheus (#32593) 2021-04-01 20:04:02 +02:00
frontendsettings_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
frontendsettings.go PanelEdit: v8 Panel Edit UX (#32124) 2021-03-25 08:33:13 +01:00
grafana_com_proxy.go Chore: Avoid aliasing importing models in api package (#22492) 2020-03-04 12:57:20 +01:00
health_test.go Backend: Migrate to using non-global configuration (#31856) 2021-03-10 12:41:29 +01:00
health.go API: Query database from /api/health endpoint (#28349) 2020-10-21 11:06:19 +02:00
http_server_test.go Tests: Batch of GoConvey to Testify conversions (#27008) 2020-08-14 14:43:25 +02:00
http_server.go Chore: Improve request distributed tracing middleware (#33033) 2021-04-20 15:22:22 +02:00
index.go Alerting: receivers page + template list (#33112) 2021-04-19 13:02:58 +03:00
ldap_debug_test.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
ldap_debug.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
login_oauth.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
login_test.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
login.go Auth: Allow soft token revocation (#31601) 2021-03-16 17:44:02 +01:00
metrics.go API: return query results as JSON rather than base64 encoded Arrow (#32303) 2021-03-31 08:35:03 -07:00
org_invite.go Login: Replace command dispatch by explicit call (#32088) 2021-03-18 17:16:56 +01:00
org_users_test.go Add an option to hide certain users in the UI (#28942) 2020-11-24 12:10:32 +01:00
org_users.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
org.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
password.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
playlist_play.go Search: add sort information in dashboard results (#30609) 2021-02-11 08:49:16 +01:00
playlist.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
plugins.go Basic streaming plugin support (#31940) 2021-03-23 20:24:08 +03:00
preferences.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
quota.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
render.go Backend: Remove more globals (#29644) 2020-12-15 19:09:04 +01:00
search.go Search: add sort information in dashboard results (#30609) 2021-02-11 08:49:16 +01:00
short_url.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
signup.go Login: Replace command dispatch by explicit call (#32088) 2021-03-18 17:16:56 +01:00
stars.go Profile: Fixes profile preferences being accessible when anonymous access was enabled (#31516) 2021-02-27 18:04:28 +01:00
team_members_test.go Add an option to hide certain users in the UI (#28942) 2020-11-24 12:10:32 +01:00
team_members.go Chore: Replace Command dispatches by explicit calls (#32131) 2021-03-19 09:14:14 +01:00
team_test.go PluginManager: Make Plugins, Renderer and DataSources non-global (#31866) 2021-03-17 16:06:10 +01:00
team.go Chore: Replace Command dispatches by explicit calls (#32131) 2021-03-19 09:14:14 +01:00
user_test.go Chore: Convert API tests to standard Go lib (#29009) 2020-11-13 09:52:38 +01:00
user_token_test.go Chore: Moves common and response into separate packages (#30298) 2021-01-15 14:43:20 +01:00
user_token.go Auth: Allow soft token revocation (#31601) 2021-03-16 17:44:02 +01:00
user.go Backend: Migrate to using non-global configuration (#31856) 2021-03-10 12:41:29 +01:00
utils.go Permissions: Validate against Team/User permission role update (#29101) 2020-11-18 15:36:41 +01:00