Add filter query params to tracing query API call
What does this MR do and why?
- Converts Tracing List UI filters to query params
- Implement
fetchTrace
(using?trace_id=
filter) - Some minor renaming / refactoring
( Part of frontend: filtering/searching traces (gitlab-org/opstrace/opstrace#2254 - closed) - Close gitlab-org/opstrace/opstrace#2292 (closed) , gitlab-org/opstrace/opstrace#2299 (closed) )
Screenshots or screen recordings
No UI Changes
How to set up and validate locally
- Enable FF
Feature.enable(:observability_tracing)
- Apply this patch ( as running the whole stack is not trivial )
diff --git a/app/assets/javascripts/observability/components/observability_container.vue b/app/assets/javascripts/observability/components/observability_container.vue
index b7697cea2996..26f6998d5969 100644
--- a/app/assets/javascripts/observability/components/observability_container.vue
+++ b/app/assets/javascripts/observability/components/observability_container.vue
@@ -33,12 +33,12 @@ export default {
// TODO: Improve local GDK dev experience with tracing https://gitlab.com/gitlab-org/opstrace/opstrace/-/issues/2308
// Uncomment the lines below to to test this locally
- // setTimeout(() => {
- // this.messageHandler({
- // data: { type: 'AUTH_COMPLETION', status: 'success' },
- // origin: new URL(this.oauthUrl).origin,
- // });
- // }, 2000);
+ setTimeout(() => {
+ this.messageHandler({
+ data: { type: 'AUTH_COMPLETION', status: 'success' },
+ origin: new URL(this.oauthUrl).origin,
+ });
+ }, 2000);
},
destroyed() {
window.removeEventListener('message', this.messageHandler);
- Go to https://local.gitlab.com:3443/flightjs/Flight/-/tracing
- Play around with the filters and submit
- Check on the network tab or console that the query params are set correctly, e.g. https://observe.gitlab.com/query/31/6/v1/traces?period=1m ( the network call will fail locally because CORS)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Daniele Rossetti