Alexander Akhmetov
a32854549c
Alerting: Support median in reduce expressions ( #91119 )
...
* Alerting: support median in reduce expressions
2024-08-01 15:04:17 +02:00
Yuri Tseretyan
9c05b30489
Chore: Add more logs and tracing to hysteresis flows ( #90369 )
2024-07-15 13:38:20 -04:00
Fabrizio
612ebf5508
Dynatrace: Add to list of DS with custom label logic ( #90258 )
2024-07-15 10:18:54 +02:00
Alexander Weaver
b3d863c11e
Expr: Make math expression scalars compliant with dataplane contract ( #90350 )
...
* Specify frame type for scalars arbitrarily
* Update alerting tests which assert on entire dataframe fields
2024-07-12 12:52:19 -05:00
Dave Henderson
6262c56132
chore(perf): Pre-allocate where possible (enable prealloc linter) ( #88952 )
...
* chore(perf): Pre-allocate where possible (enable prealloc linter)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* fix TestAlertManagers_buildRedactedAMs
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* prealloc a slice that appeared after rebase
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-14 14:16:36 -04:00
Kyle Brandt
82aa000e9d
SSE: (Chore) Update log line with context (trace) ( #89172 )
...
Improves log line to help with debugging in Server Side Expressions. In particular, the traceId, datasourceType, and datasourceUid will now be included.
2024-06-13 10:58:39 -04:00
Ryan McKinley
99d8025829
Chore: Move identity and errutil to apimachinery module ( #89116 )
2024-06-13 07:11:35 +03:00
Alexander Weaver
d004f8a98d
Alerting: Recording rules understands errors embedded in dataframes ( #88946 )
...
* Make MakeDependencyError public for tests in another package
* Create tests for errors in eval results
* Extract logic to pull frame errors out into exported function
* Maybe we can drop cyclomatic complexity lint suppression now?
* extract frame errors and fail recording rules if frames contain error
* Fix up retry logic to actually work
* Do not retry non retryable errors
2024-06-11 10:37:10 -05:00
Marcus Efraimsson
2403665998
Chore: Remove legacydata package ( #88790 )
...
* Chore: Remove legacydata package
* remove unused dependency
* sdk v0.234.0
2024-06-05 22:31:06 +02:00
Yuri Tseretyan
043e19afb5
SSE: Fix threshold unmarshal to avoid panic ( #88521 )
2024-06-03 16:16:13 -04:00
Ryan McKinley
ffc2702552
Plugins: Support Admission validation hooks ( #87718 )
2024-05-24 18:45:16 +03:00
Ryan McKinley
42b0f802de
QueryTypes: Add feature toggle to show query types in datasource apiservers ( #88213 )
...
* initial attempt
* show query types
* show query types
* with formatting
* with formatting
* more cleanup
* add feature toggle
* fix build
2024-05-23 18:46:28 +02:00
Scott Lepper
cac40795a5
sql expressions - logging ( #88193 )
...
* sql expressions - logging
2024-05-22 17:18:46 -04:00
Scott Lepper
93acc0c932
sqlexpressions - fix escape quote ( #87921 )
2024-05-15 10:55:58 -04:00
Scott Lepper
14a814a280
[sql expressions] fix: use ast to read tables ( #87867 )
...
* [sql expressions] fix: use ast to read tables
* can't run tests during ci yet. need to install duckdb
* skip for now. need duckdb cli
2024-05-14 17:05:29 -04:00
Alexander Weaver
6c47968f6c
Alerting: Do not retry rule evaluations with "input data must be a wide series but got type long" style errors ( #87343 )
...
add typed error for series must be wide, do not retry
2024-05-07 11:31:07 -05:00
Scott Lepper
1a2bbd61fd
sql expressions: improve parser ( #87277 )
...
sql expressions: improve parser
2024-05-03 08:08:07 -04:00
Scott Lepper
cbe3e3a5e0
fix: sql expressions parser with join ( #87263 )
2024-05-02 14:48:05 -04:00
Scott Lepper
4fd2cb6014
fix: sql expressions - sql parser table name case ( #87196 )
...
* fix: sql parser table name case
2024-05-02 08:43:20 -04:00
Yuri Tseretyan
e9d6135e33
SSE: Threshold expression to use simple functions ( #86062 )
...
* replace math expression with predicates
2024-04-16 13:35:41 -04:00
Nick Richmond
d3fee607e2
Expressions: sort numeric metrics behind feature toggle ( #85911 )
...
* feat: sort numeric metrics behind feature toggle
* chore: upgrade `dataplane/sdata` to latest tag
* chore: `go work sync`
2024-04-16 10:52:47 -04:00
Faye Lin
a94ab259c6
Expression: Fix a bug of the display name of the threshold expression result ( #85912 )
...
* replace ReferenceVar with RefID when creating the math command for the ThresholdCommand
* Fix the Hysteresis test
2024-04-12 17:46:14 +02:00
Dave Henderson
5687243d0b
Feature Flags: use FeatureToggles interface where possible ( #85131 )
...
* Feature Flags: use FeatureToggles interface where possible
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* Replace TestFeatureToggles with existing WithFeatures
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-04-04 12:22:31 -04:00
Ryan McKinley
4cda34ff7d
Expressions: Create json schema for query types ( #84032 )
2024-03-26 06:58:56 +02:00
Yuri Tseretyan
9dc4221508
Alerting: Log expression command types during evaluation ( #84614 )
2024-03-19 10:00:03 -04:00
carrychair
0913324668
Chore: Remove repetitive words ( #84132 )
...
remove repetitive words
Signed-off-by: carrychair <linghuchong404@gmail.com>
2024-03-11 08:55:18 -04:00
Ryan McKinley
d82f3be6f7
QueryService: Use types from sdk ( #84029 )
2024-03-08 18:12:59 +02:00
Ryan McKinley
3036b50df3
Expressions: expose ConvertDataFramesToResults ( #83805 )
2024-03-04 18:22:56 +02:00
Ryan McKinley
5f6bf93dd5
Expressions: Use enumerations rather than strings ( #83741 )
2024-03-01 19:38:32 +02:00
Scott Lepper
70009201d4
Expressions: Sql expressions with Duckdb ( #81666 )
...
duckdb temp storage of dataframes using parquet and querying from sql expressions
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-02-27 16:16:00 -05:00
Will Browne
5edd96ae77
Plugins: Refactor plugin config into separate env var and request scoped services ( #83261 )
...
* seperate services for env + req
* merge with main
* fix tests
* undo changes to golden file
* fix linter
* remove unused fields
* split out new config struct
* provide config
* undo go mod changes
* more renaming
* fix tests
* undo bra.toml changes
* update go.work.sum
* undo changes
* trigger
* apply PR feedback
2024-02-27 12:38:02 +01:00
Ryan McKinley
f23f50f58d
Expressions: Add model struct for the query types (not map[string]any) ( #82745 )
2024-02-17 02:59:11 +02:00
Will Browne
3f30cbf91c
DataSources: Add datasource fetching + querying interface ( #80749 )
...
* first pass
* separate oss + enterprise
* tidy things up
* add ctx
* fix tests
* use standalone svcs
* mv plugin context provide
* fix wire
* fix import
2024-01-19 15:56:52 +01:00
Yuri Tseretyan
bf8be46e6f
SSE: Add utility methods for HysteresisCommand ( #79157 )
...
* add GetCommandsFromPipeline
* refactor method GetCommandType to func GetExpressionCommandType
* add function to create fingerprint frames
* add function to determine whether raw query represents a hysteresis command and a function to patch it with loaded metrics
2023-12-11 22:40:31 +02:00
Giuseppe Guerra
cb0a88a027
Plugins: Backend: Skip host environment variables ( #77858 )
...
* Add pluginsSkipHostEnvVars feature flag
* Set go-plugin's SkipHostEnvVar depending on feature flags
* add missing file
* Re-generate feature flags
* Add allowedHostEnvVarNames
* Fix feature toggles not being passed to plugin context service's plugin env vars
* Fix tests
* PR review feedback: Use cfg.Features
* Fix tests
* PR review feedback: removed DefaultProviderWithFeatures
* merge with master
* fix tests
* use features.IsEnabledGlobally
2023-11-15 18:09:14 +01:00
Ryan McKinley
f69fd3726b
FeatureToggles: Add context and and an explicit global check ( #78081 )
2023-11-14 12:50:27 -08:00
Ryan McKinley
5d5f8dfc52
Chore: Upgrade Go to 1.21.3 ( #77304 )
2023-11-01 09:17:38 -07:00
Yuri Tseretyan
810fbc3327
SSE: Support hysteresis threshold expression ( #70998 )
...
* extend threshold command with second evaluator called `unloadEvaluator`
* Introduce a new expression command Hysteresis and update Threshold unmarshaller to create the HysteresisCommand if the second eval
* add feature flag `recoveryThreshold`
* update unmarshal threshold command to not re-marshall because it breaks frame definition by shuffling the schema and data fields
2023-10-10 17:51:50 +03:00
Marcus Efraimsson
e4c1a7a141
Tracing: Standardize on otel tracing ( #75528 )
2023-10-03 14:54:20 +02:00
Marcus Efraimsson
0128d0403f
Tracing: Use tracing.InitializeTracerForTest ( #75479 )
2023-09-27 09:51:57 +02:00
Andres Martinez Gotor
ece94b1e01
Chore: Remove plugincontext.ErrPluginNotFound ( #74997 )
2023-09-25 13:10:47 +03:00
Will Browne
7fca1bde54
Plugins: Set grafana config, plugin version and user agent on plugin requests ( #75171 )
...
* first pass
* fixup
* remove test line
* fix tests
* use new fields
* fix imports + formatting
* fix tests
* rollback changes
* undo whitespace
* apply pr feedback
2023-09-21 11:33:31 +02:00
Yuri Tseretyan
40c12c17bf
SSE: Reduce to add warning notice to only the first result ( #74940 )
2023-09-15 11:07:17 -04:00
Yuri Tseretyan
68eda133e4
SSE: Reduce to apply Mode to instant vector (mathexp.Number) ( #74859 )
2023-09-14 12:26:00 -04:00
Kyle Brandt
35e488b22b
SSE: Localize/Contain Errors within an Expression ( #73163 )
...
Changes SSE to not always fail all queries when one fails. Now only the query itself, and nodes that depend on it will error.
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-09-13 13:58:16 -04:00
Will Browne
e855efb13d
Plugins: Move store and plugin dto to pluginsintegration ( #74655 )
...
move store and plugin dto
2023-09-11 13:59:24 +02:00
Kyle Brandt
5cc737bb24
SSE: Put data source query grouping behind feature flag ( #74551 )
...
change was originally merged in commit: 720d716
via PR: https://github.com/grafana/grafana/pull/72935 with no flag
flag is: sseGroupByDatasource
2023-09-07 23:02:07 +03:00
Ryan McKinley
025b2f3011
Chore: use any rather than interface{} ( #74066 )
2023-08-30 18:46:47 +03:00
linoman
1b8e9b51b2
Replace signed in user for identity.requester ( #74048 )
...
* Make identity.Requester available at Context
* Clean pkg/services/guardian/guardian.go
* Clean guardian provider and guardian AC
* Clean pkg/api/team.go
* Clean ctxhandler, datasources, plugin and live
* Clean dashboards and guardian
* Implement NewUserDisplayDTOFromRequester
* Change status code numbers for http constants
* Upgrade signature of ngalert services
* log parsing errors instead of throwing error
2023-08-30 16:51:18 +02:00
Jo
a307582212
Revert "Replace signed in user for identity.requester ( #73750 )" ( #73962 )
...
This reverts commit 9b9c9e83dc
.
2023-08-28 21:05:59 +02:00