Commit Graph

42189 Commits

Author SHA1 Message Date
Stephanie Hingtgen
255d8f3326
Plugins: Remove secure socks proxy feature toggle (#66611) 2023-04-18 11:11:23 -06:00
Joey
743fdc159b
Traces: Trace view header tweaks (#66049)
* Update header info

* Modify content

* Update test

* Update test

* Add back url and remove tooltip

* Update css
2023-04-18 17:56:14 +01:00
Andreas Christou
adf12d0e90
CloudMonitor: Correctly re-render VisualMetricQueryEditor on TimeRange updates (#66756)
Compare string value rather than object
2023-04-18 16:45:59 +01:00
Ashley Harrison
c0799345dd
Chore: fix unit tests on main (#66780)
adds help node to test data as it should always be there
2023-04-18 18:29:25 +03:00
Gareth Dawson
13c5aadd5d
Loki: Don't request stats with invalid query (#65287)
* fix: dont call endpoint if invalid query

* fix: use latest lezer-logql

* refactor: use null instead of undefined

* test: returns null when query is invalid

* update
2023-04-18 15:52:37 +01:00
Andres Martinez Gotor
98c695c68f
Chore: Use Grafana API to retrieve the public key to validate plugins (#66439) 2023-04-18 16:12:05 +02:00
Ivana Huckova
f612a72f96
Loki: Update log context UI (#66730)
* fix logrowcontext scrolling behavior

* Loki: Update loki context ui menu

* Update

* Add test, update

* Use escapeLabelValueInSelector when displaying labels

* Update test for new appliedContextFilters

---------

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
2023-04-18 15:59:22 +02:00
Ashley Harrison
0741f47876
Navigation: Move SectionNav to AppChrome (#64391)
* move section nav to app chrome

* unit tests

* Move SectionNav to AppChrome folder

* fix duplicate variable rendering

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-18 14:58:00 +01:00
Gilles De Mey
2cec402647
Alerting: Fix share URL for Prometheus rules on subpath (#66752) 2023-04-18 15:47:57 +02:00
Eric Leijonmarck
6b8c77c70c
Usagestats: Add interface for stats for user.Service and add Usagestats for case_insensitive_login (#66742)
* add interface for stats

* add user service to registry
2023-04-18 14:34:40 +01:00
Leon Sorokin
75fc678d8a
Prometheus: Track incremental query request sizes with Faro (#65244)
Track incremental query usage in Faro

Co-authored-by: leeoniya <leon.sorokin@grafana.com>
Co-authored-by: Galen <galen.kistler@grafana.com>
2023-04-18 08:22:46 -05:00
Alex Moreno
f64a89727e
Alerting: Allow provenance disable in alerting provisioning API (#63650)
* Allow provenance None in alert rule update and rule group replace

* Allow provenance None in contact point update

* Allow updating policies to none by sending x-disable-provenance header

* Allow mute timings to disable provenance with x-disable-provenance header

* Allow disabling provenance by using x-disable-provenance header

* Add provenance helper to lower the cyclomatic complexity

* Do not downgrade provenance except un ReplaceRuleGroup

* Add function explanation and change error handling

* Add docs for x-disable-provenance changes (#66300)

* Add docs for x-disable-provenance changes

* Apply suggestions from code review

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update _index.md

---------

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update docs/sources/alerting/set-up/provision-alerting-resources/_index.md

Co-authored-by: George Robinson <george.robinson@grafana.com>

* Add error message check in tests

* Change docs

---------

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
2023-04-18 15:10:36 +02:00
Guilherme Caulada
614427c602
Build: Add optional build-args for COMMIT_SHA and BUILD_BRANCH (#66672)
* Remove .git from .dockerignore

* Revert "Remove .git from .dockerignore"

This reverts commit 5a4658f270.

* Add optional COMMIT_SHA and BUILD_BRANCH environment variables
2023-04-18 10:03:27 -03:00
Josh Hunt
28b8d564fe
NestedFolders: Add link to new work-in-progress UI (#66684) 2023-04-18 13:42:40 +01:00
Emil Tullstedt
948131aac3
Annotations: Ignore unique constraint violations for tags (#65935) 2023-04-18 14:21:38 +02:00
Kristina
9d69d3173f
Correlations: Add transformation editor (#66217)
* There was an attempt

* Change disabled state based on transformation type

* Add validation to transformation type

* Revert "Add validation to transformation type"

This reverts commit 2188a3d9a93aec5eeafcdd40510391ba1a53671a.

* Add validation to transformation type

* Move transformations editor to a separate file

* Make name more descriptive

* Ensure type dropdown has always the same width

* Add tooltips around transformation options

* Slight style changes

* Remove autofocus on append, integrate read only to transformationeditor, save values that disappear so they come back

* Remove yaml changes

* Have variable background color work with alternating colors on different themes

* Make expression required for regular expressions

* Remove unused empty form object

* Fix bug about transformation’s values saved in memory

* Better validation formatting for expression

* Add labels and (for now) non working test, attempt to fix saved transformation delete/add bug

* Fix datalink comment

* Remove fancy CSS due to background change

* Fix deleting saved transformation bug, finish tests

* Consolidate transformation types

* Double check aria labels

* Change aria labels, fix tests

* Add a transformation with the create correlation test

---------

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2023-04-18 07:17:30 -05:00
Eric Leijonmarck
15c9ced944
Revert "APIkeys: Add metrics for apikey endpoints (#66732)" (#66754)
This reverts commit c505d26430.
2023-04-18 13:05:52 +01:00
Kyle Brandt
840fb32ad8
SSE: (Instrumentation) Add Tracing (#66700)
spans are prefixed `SSE.`
2023-04-18 08:04:51 -04:00
Ludovic Viaud
f3fcc31277
Set a help text when a readonly prometheus has no examplars configuration (#66713) 2023-04-18 20:19:13 +09:00
brendamuir
9fad5d938d
Docs: removes alerting video blurb version (#66748) 2023-04-18 13:09:08 +02:00
Jack Baldry
43fbb9804e
Use centralized make-docs script from Writers' Toolkit (#66440)
- Adds ability to build multiple projects simultaneously using, for example, `make docs PROJECTS='grafana grafana-cloud'`.
- Adds `make doc-validator` which runs [`doc-validator`](https://github.com/grafana/technical-documentation/tree/main/tools/cmd/doc-validator) on all documentation.

Using a centralized script will help ensure consistency in workflow across all projects.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-04-18 11:46:10 +01:00
Sofia Papagiannaki
04370f92dc
Annotations: Improve get tags query performance (#66182)
* Add benchmark

* Add fix
2023-04-18 13:27:40 +03:00
Eric Leijonmarck
c505d26430
APIkeys: Add metrics for apikey endpoints (#66732)
add metrics for apikey endpoints
2023-04-18 11:12:19 +01:00
Gábor Farkas
bf3ac0ff18
loki: query splitting: labels-based frame matching (#66677) 2023-04-18 12:04:51 +02:00
Jack Westbrook
5d4bf19efb
Fix: Canary NPM publishing (#66734)
fix(npm-publishing): strip protocol from registry so npm can auth correctly
2023-04-18 12:00:05 +02:00
Jack Westbrook
e97befa221
Fix: NPM canary releases (#66727)
* fix(packages): remove double trailing slash from npmrc credentials

* chore(packages): add new line to storybook config to trigger an npm canary release
2023-04-18 11:02:37 +02:00
Jack Westbrook
efa641040d
Build: Improve NPM publishing (#65171)
* chore(packages): remove redundant npm scripts for publishing packages

* feat(packages): rewrite npm publishing script to work for manual and ci publishes

* ci(drone): update release-canary-npm-packages step to use new script

* docs(packages): update manual release instructions

* wip(packages): attempt to validate packed npm package

* fix(packages): release-canary-npm-packages should provide canary dist-tag

* ci(packages): clean up npm package validation script

* chore(devenv): add verdaccio config to allow anon publishing for easier dev npm testing

* ci(packages): clean up publishing script

* ci(drone): during build-frontend-packages, pack and validate packed tarballs

* chore(codeowners): update for publish/validate npm packages scripts

* ci(packages): fix esm loop bug matching e2e package

* ci(npm-packages): fix failing regex

* style(lib.star): run make format-drone

* style(npm-packages): shellcheck fixes for validate-npm-packages script

* docs(packages): update readme instructions for publishing locally and manually

* refactor(npm-publish): use drone when to trigger canary releases

* chore(drone): remove redundant trigger_npm_publish var

* chore(npm-publish): remove redundant echo
2023-04-18 10:19:37 +02:00
Levente Balogh
652fd8889e
Chore: Remove accidental console.log statements (#66725)
chore: remove accidental console.log statements
2023-04-18 09:59:11 +02:00
Ryan McKinley
cdb49887d8
HelpWizard: Use scenes to render dashboard inline dashboard (#64936)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-17 23:45:14 -07:00
Levente Balogh
c22c31ed13
Plugins: Fix plugin catalog filtering (#66663)
* fix: make the filters work together

* tests: add more tests
2023-04-18 09:15:35 +03:00
Sébastien Dauphin
58e3b3a90e
Update index.md (#66698)
The useful links were down as they were using /docs/grafana/next/ instead of /docs/grafana/latest/ in the path
2023-04-18 08:11:54 +02:00
Santiago
a113d94bbb
Docs: Un-draft 'Configure Integrations' docs (#66699)
* Docs: Un-draft 'Configure Integrations' docs

* fix typo
2023-04-18 08:01:52 +02:00
Alex Khomenko
49eb9db698
Cloudwatch: Fix some schema todos (#66664)
* Cloudwatch: fix todos

* Cloudwatch: Run make-gen
2023-04-18 08:46:51 +03:00
Ryan McKinley
15b469bd12
UsageStats: Add database age and driver (#66535)
Co-authored-by: Dan Cech <dcech@grafana.com>
2023-04-17 18:27:04 -07:00
Kyle Brandt
2f13c851e4
SSE: (Chore/Instrumentation) Add ds_queries_total metric and move met… (#66695)
* SSE: (Chore/Instrumentation) Add ds_queries_total metric and move metrics to service
2023-04-17 16:12:44 -07:00
Adela Almasan
45e1bfe421
Testdata: Update testdata annotations editor (#66620)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-18 01:05:09 +03:00
Ryan McKinley
09f03e92bf
FieldValues: Use simple array in panel visualizations (#66706)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-04-17 14:46:29 -07:00
Ryan McKinley
50cb4f8998
FieldValues: Use simple array in transformations and grafana/data (#66702)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-04-17 14:02:51 -07:00
George Robinson
19ebb079ba
Alerting: Add limits and filters to Prometheus Rules API (#66627)
This commit adds support for limits and filters to the Prometheus Rules
API.

Limits:

It adds a number of limits to the Grafana flavour of the Prometheus Rules
API:

- `limit` limits the maximum number of Rule Groups returned
- `limit_rules` limits the maximum number of rules per Rule Group
- `limit_alerts` limits the maximum number of alerts per rule

It sorts Rule Groups and rules within Rule Groups such that data in the
response is stable across requests. It also returns summaries (totals)
for all Rule Groups, individual Rule Groups and rules.

Filters:

Alerts can be filtered by state with the `state` query string. An example
of an HTTP request asking for just firing alerts might be
`/api/prometheus/grafana/api/v1/rules?state=alerting`.

A request can filter by two or more states by adding additional `state`
query strings to the URL. For example `?state=alerting&state=normal`.

Like the alert list panel, the `firing`, `pending` and `normal` state are
first compared against the state of each alert rule. All other states are
ignored. If the alert rule matches then its alert instances are filtered
against states once more.

Alerts can also be filtered by labels using the `matcher` query string.
Like `state`, multiple matchers can be provided by adding additional
`matcher` query strings to the URL.

The match expression should be parsed using existing regular expression
and sent to the API as URL-encoded JSON in the format:

{
    "name": "test",
    "value": "value1",
    "isRegex": false,
    "isEqual": true
}

The `isRegex` and `isEqual` options work as follows:

| IsEqual | IsRegex  | Operator |
| ------- | -------- | -------- |
| true    | false    |    =     |
| true    | true     |    =~    |
| false   | true     |    !~    |
| false   | false    |    !=    |
2023-04-17 17:45:06 +01:00
Serge Zaitsev
391a192310
Chore: Try a different way to run integration tests (#66653)
* try a different way to run integration tests

* fix formatting

* clean test cache again

* use previous command

* playing around with random commands

* dont run tests in parallel yet

* use parallel option instead of gomaxprocs

* use same package set for redis/memcached; use p=1
2023-04-17 18:33:43 +02:00
Joao Silva
8ffd58a855
AnnotationList: Fix panel not updating when variable is changed (#65899)
Squashed commit of the following:

commit 421bd0bb7e6220f1c0a65b60696e258003ebf91d
Author: Joao Silva <joao.silva@grafana.com>
Date:   Tue Apr 4 10:48:04 2023 +0100

    user essentials mob! 🔱

    lastFile:public/app/plugins/panel/annolist/AnnoListPanel.tsx

commit 862846a39d774ba78861d567b6fd42fe7e4793ad
Author: joshhunt <josh@trtr.co>
Date:   Tue Apr 4 10:35:35 2023 +0100

    user essentials mob! 🔱

commit 4ddc7febbb790ba4ff65e2739246c951a4ddbe34
Author: Tobias Skarhed <tobias.skarhed@gmail.com>
Date:   Tue Apr 4 11:20:08 2023 +0200

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:public/app/plugins/panel/annolist/AnnoListPanel.tsx

Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
2023-04-17 17:20:05 +02:00
Joao Silva
73f1cd7bad
TimePicker: Fixes issues with "Recently used absolute ranges" section (#66281)
* TimePicker: Fixes issues with "Recently used absolute ranges" section

Squashed commit of the following:

commit 99d5076ce1fadde1f22ed372f372656b58efa1c4
Author: Joao Silva <joao.silva@grafana.com>
Date:   Tue Apr 11 14:06:27 2023 +0100

    user essentials mob! 🔱

    lastFile:public/app/core/components/TimePicker/TimePickerWithHistory.tsx

commit cad0201df452f956a422b030d5b15e8ba4aed9a9
Author: eledobleefe <laura.fernandez@grafana.com>
Date:   Tue Apr 11 11:44:34 2023 +0200

    user essentials mob! 🔱

    lastFile:public/app/core/components/TimePicker/TimePickerWithHistory.tsx

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>

* TimePicker: Add correct date format

* Add convertRawToRange tests

* Rename test variables

* RTL tests

* Proper RTL tests

* Apply suggestions from code review

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>

* Remove commented line

* Fix linting

---------

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2023-04-17 17:19:44 +02:00
Ashley Harrison
ab08b4f7f2
Chore: Clean up NavModel interface (#66548)
* clean up navmodel interface

* remove concept of sections from NavModel interface

* clean up applinks
2023-04-17 16:01:32 +01:00
Sonia Aguilar
8485deb2c0
Alerting: Split silences view expired/not-expired (#66562)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2023-04-17 16:30:41 +02:00
Ashley Harrison
850f2baaf3
Chore: remove localStorage mock which doesn't work in node v18.16.0 (#66671)
remove localStorage mock which doesn't work in node v18.16.0
2023-04-17 14:40:32 +01:00
lwandz13
1e53b29eee
removed duplicate query data source section (#66605) 2023-04-17 06:36:30 -07:00
Isabel
2b7f41f4df
docs: add missing alias (#66621)
added missing alias
2023-04-17 09:25:28 -04:00
Eric Mustin
6462c81f81
Trace View: Update the queryType to traceql for checking if same trace when clicking span link (#66645)
* TraceView: update the queryType to traceql for checking if same trace when clicking span link

* TraceView: linting

* TraceView: remove traceid check completely
2023-04-17 14:17:53 +01:00
Josh Hunt
6be9264b94
NestedFolders: Don't require dev mode for feature toggle (#66501)
NestedFolders: Promote feature flag to non-dev beta
2023-04-17 15:54:32 +03:00
Ashley Harrison
3b3bd03f8a
Chore: upgrade our version of rc-cascader (#66668)
upgrade our version of rc-cascader
2023-04-17 13:45:18 +01:00