Commit Graph

258 Commits

Author SHA1 Message Date
Andre Pereira
62633ba4a7 Tempo - Replace slate with monaco editor in search tags field (#61168)
* Recreate the tempo search tags field with monaco editor instead of slate

* Remove test file no longer needed
2023-01-12 12:06:28 +00:00
Andre Pereira
298576c6a1 Tempo: Fix service graph when tempoApmTable is enabled (#60975)
Fix query variables breaking the generated query for the APM service graph
2023-01-04 16:18:41 +00:00
Andre Pereira
44afad2ce4 Tempo: TraceQL autocomplete feature tracking (#60876)
* Track usages of completion items in TraceQL query editor

* Change back traceID reportInteraction() name to avoid breaking dashboards

* Filter out TAG_VALUE labels from feature tracking to avoid exposing sensitive data
2023-01-03 10:43:11 +00:00
Andre Pereira
950f357175 Tempo: TraceQL editor bug fixes (#60414)
* Set width of common columns between trace and span rows

* Better syntax highlighting for non string constants

* Apply variables to traceql query

* Fix test
2023-01-02 14:23:50 +00:00
Andre Pereira
209b1848b8 Tempo: Merge Trace ID and TraceQL tabs (#60180)
* Remove TraceID tab when TraceQL is enabled. Use TraceQL editor to query for trace IDs by checking whether the content is an hex only string

* Highlight valid trace IDs in traceql editor

* Update trace and span links to use TraceQL tab when feature flag is enabled

* Remove traceqlEditor feature flag.

* Remove traceId query type from Tempo and replace it with traceQl
2022-12-13 08:27:45 -05:00
Hamas Shafiq
583aafbbd8 Tempo: Fix TraceQL autocomplete issues (#60058) (#60125) 2022-12-12 14:49:18 +00:00
Andrej Ocenas
c6840cfdec Tempo: Fix traceQL suggestions for tag names with dots (#59736) 2022-12-05 17:05:22 +01:00
Andre Pereira
8dbde1b921 Tempo: TraceQL table and editor (#59313)
* Tempo: Add the ability to show/hide the Span column in the table when using TraceQL

* Add optional chaining

* Update tests

* Show subcols in a subtable

* Add more space for the subtable

* Remove unused import

* Better expander icon. Improved the subtable styling. Integrated with real data

* Fix expanding the wrong index when table already has an expanded row

* ⚠️ Hack ⚠️ - Fix table links

* Link to spans

* Tempo: [TraceQL] Don't wrap the autocomplete vals for the status tag in quotes

* TraceQL result table improvements and fixes

* Include span name in the subtable

* Loop through data only if it is not nullish

* Integrate traceql with sub-tables

* Added booleans as keywords. Make query editor multiline

* Make date format consistent between trace and span

* Reset expanded indexes when data or subdata change

* Dynamic attributes by trace

* Fix test. Cleanup and refactor

* Tiny refactor

Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-11-28 16:13:03 +00:00
Ashley Harrison
d33b4918cd Chore: more any/type assertion improvements (#59229)
more any/type assertion improvements
2022-11-23 16:54:57 +00:00
Hamas Shafiq
6d94fa6aa5 Tempo: Send the correct start time when making a TraceQL query (#59128) 2022-11-23 13:45:10 +00:00
Joey Tawadrous
c76183a961 Tempo: Fix search removing service name from query (#58630)
* Fix handleOnChange deps

* Remove eslint disable
2022-11-11 10:40:13 +00:00
Hamas Shafiq
43a0afeac4 Tempo: Fix start time column sorting when using search (#56635) 2022-11-08 16:39:21 +00:00
kay delaney
a8c181bf6a Chore: Migrate usage of v1 theme to v2 (#58154) 2022-11-03 18:15:55 +00:00
Andre Pereira
90ac300d10 Tempo: Make usage of time range for TraceID query optional (#58057)
* Added switch to toggle the TraceID query time shift

* Fix and improve tests
2022-11-03 11:01:22 +00:00
Torkel Ödegaard
915ebcf832 Search: Refactor state and logic to be less fragmented and spread out (#57973)
* Started search state refactor

* Things are working

* Move more to statemanger

* minor tweaks

* Fixed name of hook

* revert yarn.lock changes

* Harderning StateManagerBase

* More tests and refinements

* Fixed unit test

* More polish

* fixing tests

* fixed test

* Fixed test
2022-11-03 08:29:39 +01:00
xiyu95
77be89eb1c Tempo: Fix dropdown issue on tag field focus (#57616) 2022-10-31 11:35:38 +01:00
kay delaney
05ceff5188 Chore: Migrate usage of v1 themes to v2 (#57617) 2022-10-26 13:28:12 +01:00
Zoltán Bedi
c0b778134e Revert: Query editor components from grafana-ui (#57436)
* Revert: QueryEditor components from grafana-ui

* Use local version of experimental

* Use experimental for query editor components

* Fix type issues in MSSQL

* point to actual version of experimental package

* point to latest version of experimental

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-10-24 17:12:36 +02:00
Hamas Shafiq
07ac388e8b Tempo: Update the query whenever the value of the TraceQL editor changes (#57199) 2022-10-21 16:01:53 +01:00
bikashmishra100
98053cfde8 Tempo: Add start time and end time parameters while querying traces (#48068)
* Add start time and end time parameters while querying tempo traces

* Added configurable time shift to query by trace id

* Test that the URL is formatted correctly

* Added test to check for time shift

* Improved label and tooltip of new time shift settings

Co-authored-by: André Pereira <adrapereira@gmail.com>
2022-10-21 15:38:10 +01:00
Hamas Shafiq
84a5ced72a Tempo: Integrate TraceQL API (#56867) 2022-10-20 10:44:59 -04:00
Hamas Shafiq
f50ab457bd Tempo: Fix Node Graph visualization type in dashboard (#56931)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-10-19 13:11:33 +01:00
Hamas Shafiq
9db61f54ff Tempo: Fix the inconsistency between the query limit values in the options component (#56566) 2022-10-11 16:08:53 +01:00
Hamas Shafiq
0ec253bfa0 Tempo: Add a placeholder to the TraceQL query editor (#55257) 2022-09-28 15:07:10 +01:00
Hamas Shafiq
62046449d2 Tempo: Add a placeholder for the Limit field under the Search tab (#55557) 2022-09-27 12:27:40 +01:00
Hamas Shafiq
4be78095c9 Tempo: Wrap the autocomplete value for a tag in double quotes (#55610) 2022-09-22 18:37:46 +01:00
Andre Pereira
c776131929 [Tempo] - Random API response and other improvements (#54905)
* Moved the SearchResponse type to types.ts.
Created a mockSearchResponse function to generate search responses.

* Generate spans in mocked response. Extend results table to accomodate spans

* Show the first spanset attributes in the table

* Added a shortcut to run the query in TraceQL editor. Added a label and link to docs above the editor

* Improved autocomplete list sorting. Improved value regex.

* Rename column to "Span"

* Tests are great!
2022-09-09 19:00:35 +01:00
Hamas Shafiq
7779ae315b Chore: Use the DEFAULT_LIMIT variable for the default value of the TraceQL Limit field (#54723) 2022-09-06 10:02:37 +01:00
Hamas Shafiq
295c36e4ec Tempo: Move interfaces & TempoQueryType from datasource.ts to types.ts (#54621) 2022-09-05 15:46:10 +01:00
Hamas Shafiq
413c7c7d99 Tempo: Cache autocomplete values for tags (#54622) 2022-09-05 15:44:44 +01:00
Hamas Shafiq
21dd60ba60 Tempo: Map the status tag to status.code for autocomplete (#54593) 2022-09-02 11:55:55 +01:00
Hamas Shafiq
d79830fdd7 Chore: Replace deprecated toPromise() calls with lastValueFrom (#54234) 2022-09-02 11:17:36 +01:00
Hamas Shafiq
e17c2f1cb5 Tempo: Add an options component under the TraceQL query field (#54435) 2022-09-01 22:49:27 +01:00
Hamas Shafiq
028ba2bf95 Chore: Change JSON file to JSON File for consistency with other tabs (#54453) 2022-09-01 09:09:13 +01:00
Andre Pereira
e3c72ef5b7 Tempo: Improve TraceQL editor autocomplete (#54461)
* Detect spansets and improve autocomplete

* Better situation detection. Autocomplete scopes

* Remove scopes from tag name to get autocomplete

* Stronger regexes. More autocomplete tests

* Split big regex in smaller regexes

* Fix autocomplete when writing a string value with spaces

* Added test for the space inside string value autocomplete case

* Syntax highlight fix when using >< operators
2022-08-31 17:31:54 +01:00
renovate[bot]
6f72c4d10d Update dependency @testing-library/user-event to v14.4.3 (#54292)
* Update dependency @testing-library/user-event to v14.4.3

* use ReturnType instead of using a nested import

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-08-26 13:30:34 +01:00
Giordano Ricci
b4334b26aa Chore: add missing properties to mocks (#54290)
* Chore: add missing properties to mocks

* update snapshot
2022-08-26 12:17:04 +01:00
Giordano Ricci
c68d7f1e35 Correlations: Add CorrelationSettings Page (#53821)
* GrafanaUI: add option to close DeleteButton on confirm click

* add datasource readOnly info to frontend settings

* move isTruthy utility type guard

* add generic non-visualization table component

* Add correlations settings page

* add missing readOnly in mock

* Fix typo

* avoid reloading correlations after add/remove

* use DeepPartial from rhf

* validate source data source

* fix validation logic

* fix navmodel test

* add missing readonly property

* remove unused styles

* handle multiple clicks on elements

* better UX for loading states

* fix remove handler

* add glue icon
2022-08-26 11:27:28 +01:00
Hamas Shafiq
5148464c88 Jaeger: Make search form fields more consistent with Tempo (#54026) 2022-08-25 09:51:21 +01:00
Ryan McKinley
b483ac322f Chore: replace React.FC<Props> with simple function component (#54123) 2022-08-24 16:54:34 -04:00
Andre Pereira
c8f2148f75 Tempo: Basic PoC of the upcoming TraceQL editor in Explore (#54028)
* First working version of the TraceQL editor with syntax highlighting and autocomplete

* Add feature flag around the new editor option

* Fix tests and cleanup

* Fix misspelling
2022-08-24 17:57:59 +01:00
Hamas Shafiq
afa7e8d8de Tempo: Make TempoQuery.search & SearchQueryParams.tags optional (#54052) 2022-08-23 12:27:19 +01:00
Hamas Shafiq
5f80bf5297 Tempo: Remove unused functions in datasource.ts (#54081) 2022-08-23 12:02:43 +01:00
Hamas Shafiq
895616a231 Tempo: Remove spanName from the query object if undefined (#53945) 2022-08-22 11:52:36 +01:00
Hamas Shafiq
6b1804b6c0 Tempo: Set the default query type even if queryType was set to 'clear' (#53887) 2022-08-19 09:41:39 +01:00
Hamas Shafiq
a6ff6cd0c1 Tempo: Remove unused theme param in getStyles (#53823) 2022-08-18 09:55:24 +01:00
Hamas Shafiq
3e209c06f3 Tempo: Fix typo in the tooltip for 'Limit' (#53750) 2022-08-16 06:52:44 -04:00
Ashley Harrison
f1295e4bd0 Chore: Update version of @grafana/eslint-config (#53403)
* use let/const over var

* use new version of @grafana/eslint-config
2022-08-08 15:19:15 +01:00
Joey Tawadrous
dc0ef2913e Tempo: Set APM table default span kind (#52851)
* Add span kind server to query

* Updated test
2022-07-27 15:48:09 +01:00
Joey Tawadrous
cb35729553 Traces: Align APM table names (#52591)
* Order col values according to rate names order

* Tests
2022-07-25 18:59:43 +01:00