Commit Graph

186 Commits

Author SHA1 Message Date
Andre Pereira
541a03f33b
Tempo: TraceQL Configurable static fields (#65284)
* TraceQL - configurable static fields for new UI

* TraceQL - filter out static fields from Tags section. Added tooltip to static fields

* Add more units to duration validation. Improve duration field tooltip with accepted units

* Better control of delete button on SearchField

* Move new config behind feature toggle

* Special title for intrinsic "name"

* Fix tests

* Move static fields not in the datasource to the Tags section

* Start using the useAsync hook in the Tempo TraceQL configuration page to retrieve the tags and datasource

* Fix tests

* Fix test. Use useAsync to retrieve options in SearchField

* Remove ability to set a default value in filter configuration.
Removed type from filter, dynamic filters are now any filters not present in the datasource config

* Updated the static filters tooltip

* Replace useState + useEffect with useMemo for scopedTag
2023-03-31 10:35:37 +01:00
Ashley Harrison
98e66654d6
Chore: Some type fixes needed for react 18 (#65600)
some type fixes needed for react 18
2023-03-30 13:40:18 +01:00
Joey
b1a7e1d33d
Tempo: Update service graph view and docs (#64875)
Update service graph view and docs
2023-03-22 08:37:44 +00:00
Andre Pereira
bfb0dde4a8
Tempo: Search using TraceQL improvements (#64616)
* Added scope to filter

* Intrinsic fields don't have scope

* Consistent plus button placement next to the last tag. Changed All Scopes to "unscoped"

* Added validation to duration fields

* Disable options load when dropdown is opened

* Use focused list of operators when all values are of type string or int/float

* Fixed and added tests

* Fix another test

* Better way to prevent duplicate and redundant backend requests when a filter updates
2023-03-21 15:59:16 +00:00
Domas
ff49683673
Tempo: Set default limit if none is provided for traceql queries (#65039)
add default limit to tempo datasource traceql searches
2023-03-20 14:47:23 +02:00
Ashley Harrison
b19f7bb653
Chore: update more unit tests to work with react 18 (#64812)
update more unit tests to work with react 18
2023-03-16 10:00:39 +00:00
Ryan McKinley
d710507bc5
Chore: Avoid explicit React.FC<Props> when possible (#64722) 2023-03-14 16:38:21 +02:00
Andre Pereira
fd37ff29b5
Tempo: New Search UI using TraceQL (#63808)
* WIP of creating new components to support the Search tab using TraceQL

* Search fields now require an ID. Added duration fields to new Search UI

* Distinguish static from dynamic fields. Added dynamic tags input

* Moved new search behind traceqlSearch feature flag. Added handling of different types of values to accurately wrap them in quotes when generating query.

* Hold search state in TempoQuery to leverage state in URL. Moved types to schema file

* Use a read only monaco editor to render a syntax highlighted generated query. Added tooltip to duration. Added query options section

* Support multiple values using the regex operator and multi input

* Delete dynamic filters

* Automatically select the regex op when multiple values are selected. Revert to previous operator when only one value is selected

* Added tests for SearchField component

* Added tests for the TraceQLSearch component

* Added tests for function that generates the query

* Fix merge conflicts

* Update test

* Replace Search tab when traceqlSearch feature flag is enabled. Limit operators for both name fields to =,!=,=~

* Disable clear button for values

* Changed delete and add buttons to AccessoryButton. Added descriptions to operators

* Remove duplicate test

* Added a prismjs grammar for traceql. Replaced read only query editor with syntax highlighted query. Removed spaces between tag operator and value when generating query.

* Fix support for custom values when isMulti is enabled in Select

* Use toOption function
2023-03-06 16:31:08 +00:00
Joey
b6eb324139
Tempo: Config and doc updates (#64017)
* Config and doc upgrades

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update tags text

* Use service graph as a proper noun

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Update docs/sources/datasources/tempo/_index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* Yarn prettier

---------

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2023-03-06 16:03:29 +00:00
Brendan O'Handley
2372b7c626
Prometheus: Improve prometheus query variable editor (#63529)
* add prom query var editor with tests and migrations

* fix migration, now query not expr

* fix label_values migration

* remove comments

* fix label_values() variables order

* update UI and use more clear language

* fix tests

* use null coalescing operators

* allow users to query label values with label and metric if they have not set there flavor and version

* use enums instead of numbers for readability

* fix label&metrics switch

* update type in qv editor

* reuse datasource function to get all label names, getLabelNames(), prev named getTagKeys()

* use getLabelNames in the query var editor

* make label_values() variables label and metric more readable in the migration

* fix tooltip for label_values to remove API reference

* clean up tooltips and allow newlines in query_result function

* change function wording and exprType to query type/qryType for readability

* update prometheus query variable docs

* Update public/app/plugins/datasource/prometheus/components/VariableQueryEditor.tsx

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>

* handle jsonnet grafana as code variables

---------

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2023-02-27 08:38:05 -05:00
Ashley Harrison
4a2695349d
Chore: more ts test fixes (#63438)
* replace anys in tests

* more test fixes

* clean up any's in tests
2023-02-23 10:07:44 +00:00
Brendan O'Handley
879f980084
Revert "Prometheus Datasource: Improve Prom query variable editor" (#63278)
Revert "Prometheus Datasource: Improve Prom query variable editor (#58292)"

This reverts commit eedcd7d5b1.
2023-02-10 12:31:16 -05:00
Brendan O'Handley
eedcd7d5b1
Prometheus Datasource: Improve Prom query variable editor (#58292)
* add prom query var editor with tests and migrations

* fix migration, now query not expr

* fix label_values migration

* remove comments

* fix label_values() variables order

* update UI and use more clear language

* fix tests

* use null coalescing operators

* allow users to query label values with label and metric if they have not set there flavor and version

* use enums instead of numbers for readability

* fix label&metrics switch

* update type in qv editor

* reuse datasource function to get all label names, getLabelNames(), prev named getTagKeys()

* use getLabelNames in the query var editor

* make label_values() variables label and metric more readable in the migration

* fix tooltip for label_values to remove API reference

* clean up tooltips and allow newlines in query_result function

* change function wording and exprType to query type/qryType for readability

* update prometheus query variable docs

* Update public/app/plugins/datasource/prometheus/components/VariableQueryEditor.tsx

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>

---------

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2023-02-09 15:35:36 -05:00
Andre Pereira
60f2433a0f
Tempo: TraceQL syntax highlighting improvements (#62349)
* Better syntax highlighting for durations, floats and right-hand-side tags

* Remove hex rule in TraceQL syntax highlighting
2023-02-02 15:48:29 +00:00
Andre Pereira
b78af0b0f0
Tempo: Inject status and status.code for tags autocomplete (#62794)
* Tempo: Inject status for v2 and status.code for v1 in the tags list for autocomplete

* Small comment fix
2023-02-02 15:43:28 +00:00
Andre Pereira
5e1506dea0
Tempo: Remove tempoApmTable feature flag (#62499)
Remove tempoApmTable feature flag
2023-02-01 15:56:34 +00:00
Hamas Shafiq
c3b476e1dc
Tempo: Fix span name being dropped from the query (#62257) 2023-01-31 14:11:29 +00:00
Andre Pereira
850d5141cf
Tempo: DataQuery type as a schema (#62119)
* Tempo data query wip

* Replace TempoQuery with new type from schema

* Added some documentation for each DataQuery field

* Change limit type from number to int64

* Use TempoDataQuery instead of local model in the backend

* Update report.json
2023-01-31 11:29:50 +00:00
Andre Pereira
afd39c18ba
Explore: Refactor trace view and move to core (#61938)
* Move TraceView to core grafana

* Remove unused code

* yarn install

* Remove jaeger-ui-components from CODEOWNERS and other tools

* Type fixes

* yarn install

* Remove mock that we no longer need

* Fix merge conflicts

* Re-add Apache license for trace view components

* Use an exclamation-circle instead of triangle to denote errors

* Remove eslint disables and update betterer results instead
2023-01-27 14:13:17 +00:00
Joey Tawadrous
591501ef3f
Traces: Upgraded feature tracking (#62181)
Upgraded feature tracking
2023-01-27 13:33:27 +00:00
Joey Tawadrous
1423f15b0d
Tempo: Update column width for Loki search (#61924)
Update col widths
2023-01-26 09:35:44 +00:00
Hamas Shafiq
1f55a54543
Tempo: Create separate functions for querying the v1/v2 API for tag values (#61998) 2023-01-25 17:12:59 +00:00
Stephanie Hingtgen
0a1f31814a
Plugins: add UI for more supported datasources with secure socks proxy feature toggle (#61962) 2023-01-25 08:39:17 -07:00
Hamas Shafiq
76e1946bd7
Tempo: [TraceQL] Do not override the status tag name (#62030) 2023-01-24 19:21:48 +00:00
Joe Elliott
3eb065339f
Tempo Datasource: Correct TraceQL docs link (#61931)
* correct link

Signed-off-by: Joe Elliott <number101010@gmail.com>

* lint

Signed-off-by: Joe Elliott <number101010@gmail.com>

Signed-off-by: Joe Elliott <number101010@gmail.com>
2023-01-23 16:59:55 +00:00
Hamas Shafiq
5eca966f45
Tempo: [TraceQL] Integrate the new tag values API (#61637)
* Tempo: [TraceQL] Integrate the new tag values API

* Use the exact string entered in the spanset

* Update a test & add a new test

* Empty commit
2023-01-23 15:39:56 +00:00
Joey Tawadrous
4076933e66
Traces: extra feature tracking (#61348)
* grafana_traces_service_graph_size

* grafana_traces_trace_view_find_next_prev_clicked

* grafana_traces_trace_view_scroll_to_top_clicked

* grafana_traces_cheatsheet_clicked
2023-01-17 14:43:28 +00:00
Joey Tawadrous
58c4c95e92
Tempo: dashboard feature tracking (#61210)
* grafana_tempo_dashboard_loaded

* Update version

* Updates

* Added more tracking stats + updates
2023-01-13 16:31:44 +00:00
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