Arthur Silva Sens
650f4d7a72
Merge remote-tracking branch 'origin/main' into resolve-conflicts-2.52
2024-05-02 10:47:45 -03:00
Arthur Silva Sens
f170a014f3
Merge pull request #13969 from prometheus/prepare-v2.52
...
Prepare v2.52.0-rc.0 release
2024-04-30 09:18:30 -03:00
Bryan Boreham
5c8ffaa77c
bugfix: API: encode empty Vector/Matrix as []
...
If the underlying data is `nil` the default encoding
will render `"null"` which is not accepted by
(some) Prometheus client libraries.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-04-29 19:08:10 +01:00
Bryan Boreham
00247b5d87
test: API: check empty responses
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-04-29 19:08:10 +01:00
Bryan Boreham
e0a00f45db
refactor: API: separate typed and unsafe marshalling
...
The typed versions are used when we call from one marshaller to another.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-04-29 19:08:10 +01:00
Bryan Boreham
66a1c3daad
refactor: API: be explicit that we marshal empty objects
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-04-29 19:08:10 +01:00
Bryan Boreham
c8aed6b0ec
tests: API: Let nil expected response mean skip check
...
When we want to check just the json encoding.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-04-29 19:08:10 +01:00
Bryan Boreham
5a339ba359
tests: API: Use jsoniter when encoding
...
So that tests use the same encoding as the api.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-04-29 19:08:10 +01:00
Bryan Boreham
2c4a36376d
tests: API: simplify check of error response
...
Since we already use require.JSONEq in similar cases.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-04-29 19:08:10 +01:00
Neeraj Gartia
99f9d32499
UTF-8: updates UI parser to support UTF-8 characters ( #13590 )
...
Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2024-04-29 11:14:01 +02:00
Arthur Silva Sens
9195d51469
Prepare v2.52 release
...
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2024-04-24 17:19:43 -03:00
Bryan Boreham
e1dd8e72df
Merge branch 'main' into merge-2.51.2-into-main
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-04-10 15:05:52 +01:00
Bryan Boreham
b4c0ab52c3
Cut release 2.51.2
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-04-10 11:08:16 +01:00
Matthieu MOREL
d496687c8e
golangci-lint: enable usestdlibvars linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-04-08 19:26:23 +00:00
Bryan Boreham
e1a5886c88
Merge branch 'main' into merge-2.51-into-main
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-28 10:00:25 +00:00
Bryan Boreham
855b5ac4b8
Cut release 2.51.1 ( #13853 )
...
* Cut release 2.51.1
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-28 09:23:45 +00:00
Björn Rabenstein
7ba218fbd0
Merge pull request #13791 from bboreham/merge-2.51.0
...
Merge 2.51.0 into main
2024-03-19 19:15:25 +01:00
Erlan Zholdubai uulu
742196b6c4
add context cancellation check at get series result iteration ( #13766 )
...
* add context cancellation check at get series iteration
* add warnings and closer on error
* add test
---------
Signed-off-by: Erlan Zholdubai uulu <erlanz@amazon.com>
2024-03-19 18:37:43 +01:00
Bryan Boreham
0630e49c0d
Merge branch 'main' into merge-2.51.0
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-19 11:56:14 +01:00
Bryan Boreham
c05c15512a
Cut v2.51.0 ( #13787 )
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-19 10:49:40 +00:00
Bartlomiej Plotka
312e3fd728
Merge pull request #13713 from charleskorn/query-engine-interface
...
rules: allow using alternative PromQL engines for rule evaluation by callers using Prometheus as a lib.
2024-03-13 14:45:42 +01:00
Charles Korn
26262a1eb7
Remove unnecessary `SetQueryLogger` method on `QueryEngine` interface
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-03-12 22:01:01 +11:00
guoguangwu
1cccdbaedb
chore: use constant instead of numeric literal
...
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
2024-03-12 17:19:50 +08:00
Bryan Boreham
8d53e7ba90
Cut v2.51.0-rc.0 ( #13729 )
...
* Cherry-pick [BUGFIX] Azure SD: Fix 'error: parameter virtualMachineScaleSetName cannot be empty' (#13702 )
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-11 13:35:44 +00:00
Björn Rabenstein
9acae57937
Merge pull request #13681 from krajorama/native-latency-histograms
...
Add native histograms to latency/duration metrics
2024-03-07 20:46:43 +01:00
Bryan Boreham
25f200bf85
API tests: fix flaky TestEndpoints
...
When a limit is specified, the API may return arbitrary rows, so don't
check specific response values.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-03-06 09:59:18 +00:00
Charles Korn
4e77e8e5ef
Allow using alternative PromQL engines for rule evaluation
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-03-06 14:54:33 +11:00
György Krajcsovits
4d4d822c36
Add native histograms to latency/duration metrics
...
Dogfood native histograms.
Allow dependent projects to migrate to native histograms.
I took the defaults from client_golang.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2024-03-01 14:44:38 +01:00
Kartikay
8736772053
web/api: add limit param on series, labels, label-values ( #13396 )
...
Support limit parameter in queries to restrict output data to the specified size, on the following endpoints:
/api/v1/series
/api/v1/labels
/api/v1/label/:name:/values
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
Signed-off-by: Kartikay <kartikay_2101ce32@iitp.ac.in>
2024-02-29 15:31:13 +00:00
Manik Rana
ab9b770aea
ui (histograms): Add native histogram chart to Table view ( #13658 )
...
* feat: initial add histogram table
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* feat: add x-axis scale toggle
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: adjust histogram summary styles
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* feat: initial add histogram table
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* feat: add x-axis scale toggle
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: adjust histogram summary styles
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: remove unused code
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* tests: test for HistogramChart instead of HistogramString
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: remove histogramChart from a test
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: rename style classes
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: suppress test errors
Signed-off-by: Manik Rana <manikrana54@gmail.com>
---------
Signed-off-by: Manik Rana <manikrana54@gmail.com>
2024-02-29 14:21:15 +01:00
machine424
f477e0539a
Move from golang.org/x/exp/slices into slices now that we only support Go >= 1.21
...
Prevent adding back golang.org/x/exp/slices.
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-02-28 14:54:53 +01:00
Bryan Boreham
d2817e9c91
Merge pull request #12304 from bboreham/labels-symboltable
...
Labels: reduce memory by de-duplicating strings in SymbolTables
2024-02-26 14:06:27 +00:00
Bryan Boreham
518ab179fb
Merge branch 'release-2.50' into merge-2.50.1
2024-02-26 11:50:06 +00:00
Bryan Boreham
9ba13de220
scraping: pass a Builder to get Target labels
...
This saves memory allocations from making a new Builder every time.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-26 11:45:25 +00:00
Bryan Boreham
eff3a13e19
model/textparse: parsers take a labels SymbolTable
...
This allows strings to be interned to save memory.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-26 11:45:25 +00:00
Bryan Boreham
e537d6d1c1
Cut 2.50.1 with metadata api bugfix
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-26 10:00:21 +00:00
ismail simsek
eecaa71ff1
Fix: metadata API using wrong field names ( #13633 )
...
Fix is to add json tags to `Metadata` struct. Absence of these tags
causes Go to use the field name, which starts with an upper-case
letter and breaks the protocol.
Extend tests to verify the JSON response.
Signed-off-by: ismail simsek <ismailsimsek09@gmail.com>
2024-02-26 09:54:39 +00:00
ismail simsek
2507469291
Fix: metadata API using wrong field names ( #13633 )
...
Fix is to add json tags to `Metadata` struct. Absence of these tags
causes Go to use the field name, which starts with an upper-case
letter and breaks the protocol.
Extend tests to verify the JSON response.
Signed-off-by: ismail simsek <ismailsimsek09@gmail.com>
2024-02-26 09:53:39 +00:00
Manik Rana
08832e2db8
histogram: add UI tests for rendering histogram ( #13631 )
...
* histogram: add tests for rendering histograms
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* histogram: add tests for rendering histograms
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: remove unused import
Signed-off-by: Manik Rana <manikrana54@gmail.com>
---------
Signed-off-by: Manik Rana <manikrana54@gmail.com>
2024-02-23 11:31:39 +01:00
Augustin Husson
9738e48a7d
Merge pull request #13629 from prometheus/release-2.50
...
merge back release 2.50
2024-02-22 11:07:52 +01:00
Augustin Husson
814b920e8a
Cut v2.50.0 ( #13612 )
...
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2024-02-22 10:21:59 +01:00
Augustin Husson
93591ec5cc
Cut v2.50.0-rc.1 ( #13602 )
...
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2024-02-19 14:15:03 +01:00
Bryan Boreham
aba0071480
Merge pull request #13589 from bboreham/trace_id
...
Standardise exemplar label as "trace_id"
2024-02-19 09:34:04 +00:00
Owen Williams
a28d7865ad
UTF-8: Add support for parsing UTF8 metric and label names
...
This adds support for the new grammar of `{"metric_name", "l1"="val"}` to promql and some of the exposition formats.
This grammar will also be valid for non-UTF-8 names.
UTF-8 names will not be considered valid unless model.NameValidationScheme is changed.
This does not update the go expfmt parser in text_parse.go, which will be addressed by https://github.com/prometheus/common/issues/554/ .
Part of https://github.com/prometheus/prometheus/issues/13095
Signed-off-by: Owen Williams <owen.williams@grafana.com>
2024-02-15 14:34:37 -05:00
Bryan Boreham
c0e36e6bb3
Standardise exemplar label as "trace_id"
...
This is consistent with the OpenTelemetry standard, and an example in OpenMetrics.
https://github.com/open-telemetry/opentelemetry-specification/blob/89aa01348139/specification/metrics/data-model.md#exemplars
https://github.com/OpenObservability/OpenMetrics/blob/138654493130/specification/OpenMetrics.md#exemplars-1
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-15 14:20:08 +00:00
Augustin Husson
452f4c96b7
Cut v2.50.0-rc.0 ( #13465 )
...
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2024-02-13 10:21:23 +01:00
Bryan Boreham
39af788dbd
Tests: use replacement DeepEquals using go-cmp
...
Use DeepEqual replacement using go-cmp, which is more flexible.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-08 19:30:20 +00:00
Bryan Boreham
98c4889029
Merge pull request #9298 from Creatone/creatone/use-testify
...
tests: Move from t.Errorf and others.
2024-02-04 16:27:57 +01:00
Faustas Butkus
6feffeb92e
promql: add histogram_avg function ( #13467 )
...
Add histogram_avg function
---------
Signed-off-by: Faustas Butkus <faustas.butkus@gmail.com>
Signed-off-by: Björn Rabenstein <github@rabenste.in>
Co-authored-by: Björn Rabenstein <github@rabenste.in>
2024-02-01 18:28:42 +01:00
Bryan Boreham
16e68c01e4
tests: remove err from message when testify prints it already
...
For instance `require.NoError` will print the unexpected error; we don't
need to include it in the message.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-02-01 14:18:01 +00:00