Julius Volz
d4935fbf6e
Fix OpenAPI defs
...
Signed-off-by: Julius Volz <julius.volz@gmail.com >
2026-04-10 19:13:39 +02:00
Julius Volz
034c29411a
Use ProtoJSON, allow regex-based filtering of metric names
...
Signed-off-by: Julius Volz <julius.volz@gmail.com >
2026-04-10 16:05:40 +02:00
Julius Volz
318c913fe2
Add API endpoint for getting Prometheus' metrics about itself
...
This adds a /api/v1/status/self_metrics endpoint that allows the frontend to
fetch metrics about the server itself, making it easier to construct frontend
pages that show the current server state. This is needed because fetching
metrics from its own /metrics endpoint would be both hard to parse and also
require CORS permissions on that endpoint (for cases where the frontend
dashboard is not the same origin, at least).
Signed-off-by: Julius Volz <julius.volz@gmail.com >
2026-04-10 16:05:08 +02:00
Julien Pivotto
f45a7ee818
chore: speed up build time by moving helpers to test files.
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-04-09 12:02:29 +02:00
Julien Pivotto
fa4270f939
web/api: use http.NoBody instead of nil for request body in test
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-04-07 16:48:02 +02:00
Cheese Cake
d81310dc4b
web/api: remove deprecated DELETE /api/v1/series endpoint ( #18083 )
...
Signed-off-by: cheese-cakee <farzanaman99@gmail.com >
2026-04-07 13:49:24 +02:00
Matthieu MOREL
026d284c43
chore: fix httpNoBody issues from gocritic
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2026-03-02 20:06:30 +01:00
Martin Valiente Ainz
eb5a0e1eed
Refactor parse.go into an instance-based Parser interface
...
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com >
2026-02-11 11:21:49 +01:00
Martin Valiente Ainz
539936c861
Replace per-component parser options with default instance
...
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com >
2026-02-11 11:16:04 +01:00
Martin Valiente Ainz
af16f35ad6
PromQL: Refactor parser to use instance configuration instead of global flags
...
Parser configuration is now per-engine/API/loader and no longer uses package-level flags, so behavior is consistent and tests don't rely on save/restore of global variables.
Signed-off-by: Martin Valiente Ainz <64830185+tinitiuset@users.noreply.github.com >
2026-02-11 11:16:04 +01:00
Julien
37058a3154
Merge pull request #17975 from roidelapluie/roidelapluie/openapistats
...
OpenAPI: Add support for stats
2026-02-05 10:55:44 +01:00
Bartlomiej Plotka
7769495a4a
refactor: switch OTLP handler to AppendableV2 ( #17996 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
* refactor: switch OTLP handler to AppendableV2
Signed-off-by: bwplotka <bwplotka@gmail.com >
* addressed comments
Signed-off-by: bwplotka <bwplotka@gmail.com >
---------
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-02-03 16:44:40 +00:00
Arve Knudsen
51d33be878
web: switch from gopkg.in/yaml to go.yaml.in/yaml ( #17979 )
...
Replace gopkg.in/yaml.v2 and gopkg.in/yaml.v3 imports with
go.yaml.in/yaml/v2 and go.yaml.in/yaml/v3 respectively.
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2026-02-03 14:15:35 +00:00
Julien Pivotto
e2d028a46e
OpenAPI: Add support for stats
...
An oversight on the OpenAPI specification; which did not include stats.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-01-30 14:21:03 +01:00
Julius Volz
0c543d5a41
Merge pull request #17969 from 1seal/relabel-steps-linear
...
web/api: compute relabel_steps in a single pass
2026-01-29 20:55:25 +01:00
Julien
75f94903b3
Add OpenAPI 3.2 specification generation for Prometheus HTTP API ( #17825 )
...
* Add OpenAPI 3.2 specification generation for Prometheus HTTP API
This commit introduces an OpenAPI specification for the Prometheus API.
After testing multiple code-generation servers with built-in APIs, this
implementation uses an independent spec file outside of the critical path.
This spec file is tested with a framework present in this pull request.
The specification helps clients know which parameters they can use and is
served at /api/v1/openapi.yaml. The spec file will evolve with the
Prometheus API and has the same version number.
Downstream projects can tune the APIs presented in the spec file with
configuration options using the IncludePaths setting for path filtering.
In the future, there is room to generate a server from this spec file
(e.g. with interfaces), but this is out of scope for this pull request.
Architecture:
- Core OpenAPI infrastructure (openapi.go): Dynamic spec building,
caching, and thread-safe spec generation
- Schema definitions (openapi_schemas.go): Complete type definitions
for all API request and response types
- Path specifications (openapi_paths.go): Endpoint definitions with
parameters, request bodies, and response schemas
- Examples (openapi_examples.go): Realistic request/response examples
- Helper functions (openapi_helpers.go): Reusable builders for common
OpenAPI structures
Testing:
- Comprehensive test suite with golden file validation
- Test helpers package for API testing infrastructure
- OpenAPI compliance validation utilities
The golden file captures the complete specification for snapshot testing.
Update with: go test -run TestOpenAPIGolden -update-openapi-spec
REVIEWERS: The most important thing to check would be the OpenAPI golden
file (web/api/v1/testdata/openapi_golden.yaml). Test scenarios are important
as they test the actual OpenAPI spec validity.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
* Add OpenAPI 3.1 support with version selection
Add support for both OpenAPI 3.1 and 3.2 specifications with version
selection via openapi_version query parameter. Defaults to 3.1 for
broader compatibility
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
* Enhance OpenAPI examples and add helper functions
- Add timestampExamples helper for consistent time formatting
- Add exampleMap helper to simplify example creation
- Improve example summaries with query details
- Add matrix result example for range vector queries
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
* web/api: Add AtST method to test helper iterators
Implement the AtST() method required by chunkenc.Iterator interface
for FakeSeriesIterator and FakeHistogramSeriesIterator test helpers.
The method returns 0 as these test helpers don't use start timestamps
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
* OpenAPI: Add minimum coverage test
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
* OpenAPI: Improve examples handling
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
---------
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2026-01-29 13:36:13 +01:00
1seal
79b553499a
web/api: compute relabel_steps in single pass
...
Signed-off-by: 1seal <security@1seal.org >
2026-01-29 12:22:54 +00:00
Bartlomiej Plotka
aa0f00efdf
tests(teststorage, api_test): Fix leaking readers; kill fake exemplar storage ( #17906 )
...
* tests(teststorage): Fix leaking readers; use TSDB exemplar storage instead of fake
Signed-off-by: bwplotka <bwplotka@gmail.com >
* switched to v1 exemplar flow for now
Signed-off-by: bwplotka <bwplotka@gmail.com >
---------
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-01-27 10:07:56 +00:00
Bartlomiej Plotka
0d116b0994
tests(teststorage): Close Storage in the helper ( #17902 )
...
Signed-off-by: bwplotka <bwplotka@gmail.com >
2026-01-23 08:41:35 +00:00
Julius Volz
af3277f832
PromQL: Add fill*() binop modifiers to provide default values for missing series
...
Signed-off-by: Julius Volz <julius.volz@gmail.com >
2026-01-15 07:56:21 +01:00
Ben Kochie
e14795bbf4
Remove copyright date from headers ( #17785 )
...
Remove copyright dates from various files as part of [PROM-50].
[PROM-50]: https://github.com/prometheus/proposals/blob/main/proposals/0050-remove-copyright-dates.md
Signed-off-by: SuperQ <superq@gmail.com >
2026-01-05 13:46:21 +01:00
Julien
f73aba34cd
Merge pull request #17427 from roidelapluie/roidelapluie/ffapi
...
API: Add a /api/v1/features endpoint
2025-12-10 10:14:03 +01:00
Julien Pivotto
a5671a002f
API: Add a /api/v1/features endpoint
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2025-12-09 16:13:14 +01:00
Julien Pivotto
5b26619565
web/api: Add maximum limit validation to TSDB status endpoint
...
Add a maximum limit of 10,000 to the TSDB status endpoint to prevent
resource exhaustion from excessively large limit values, as we preallocate
[]Stat for up to the limit: `make([]Stat, 0, length)`.
Note that the endpoint acquires a cardinality mutex during
stats calculation, so this can not be run in parallel.
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2025-12-09 14:30:08 +01:00
Bartlomiej Plotka
f50ff0a40a
feat: rename CreatedTimestamp to StartTimestamp ( #17523 )
...
Partially fixes https://github.com/prometheus/prometheus/issues/17416 by
renaming all CT* names to ST* in the whole codebase except RW2 (this is
done in separate
[PR](https://github.com/prometheus/prometheus/pull/17411 )) and
PrometheusProto exposition proto.
```
CreatedTimestamp -> StartTimestamp
CreatedTimeStamp -> StartTimestamp
created_timestamp -> start_timestamp
CT -> ST
ct -> st
```
Signed-off-by: bwplotka <bwplotka@gmail.com >
2025-11-13 14:17:51 +00:00
Minh Nguyen
7ebff91cfd
OTLP Receiver: Only update metadata to WAL when metadata-wal-records feature is enabled ( #17472 )
...
OTLP Receiver: Only update metadata to WAL when metadata-wal-records feature is enabled.
---------
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
2025-11-13 09:53:12 +01:00
Minh Nguyen
30992dd032
[RW2] Fix: Only update metadata to WAL when metadata-wal-records feature is enabled ( #17470 )
...
* add feature check when UpdateMetadata
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
* add appendMetadata boolean to write_hander
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
* fix
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
---------
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
2025-11-04 08:16:57 +00:00
Ben Kochie
48956f60d7
Update modernize ( #17471 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Apply additional Go modernize tool improvements.
Signed-off-by: SuperQ <superq@gmail.com >
2025-11-04 05:13:49 +00:00
Julius Volz
0093e2159e
Merge pull request #17337 from prometheus/ui/visualize-relabel-steps
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
ui: Allow viewing detailed relabeling steps for each discovered target
2025-11-02 13:51:55 +01:00
Julius Volz
dca3289c28
Merge pull request #17334 from roidelapluie/roidelapluie/explain
...
UI: Add smoothed/anchored in explain
2025-10-27 14:11:36 +01:00
Minh Nguyen
f070e35358
[RW]: Adopt client_golang/exp/api/remote types for receiving RW1 and RW2 ( #17197 )
...
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
# Conflicts:
# storage/remote/write_handler.go
* add comment
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
* fix
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
* fix failling test
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
* nit_fixing
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
* fix comment
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
---------
Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com >
2025-10-24 10:31:34 +01:00
Julien Pivotto
02985d2ddd
Add anchored/smoothed to explain
...
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com >
2025-10-20 13:37:39 +02:00
harsh kumar
16a9a827de
remote-write: Add type and unit labels to 2.0 receiver when feature flag enabled ( #17329 )
...
Stale Check / stale (push) Has been cancelled
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
* feat(remote): add support for type and unit labels in write handler
Signed-off-by: Harsh <harshmastic@gmail.com >
* minor fixes
Signed-off-by: Harsh <harshmastic@gmail.com >
* fix failing tests
Signed-off-by: Harsh <harshmastic@gmail.com >
* Update storage/remote/write_handler.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com >
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com >
* Update storage/remote/write_handler.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com >
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com >
* refactor: streamline label handling for type and unit in write handler tests
Signed-off-by: Harsh <harshmastic@gmail.com >
* test: enhance V2 message tests for type and unit labels
Signed-off-by: Harsh <harshmastic@gmail.com >
---------
Signed-off-by: Harsh <harshmastic@gmail.com >
Signed-off-by: harsh kumar <135993950+hxrshxz@users.noreply.github.com >
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com >
2025-10-15 18:19:41 +01:00
Julius Volz
8b1bd7d6c3
ui: Allow viewing detailed relabeling steps for each discovered target
...
This adds:
* A `ScrapePoolConfig()` method to the scrape manager that allows getting
the scrape config for a given pool.
* An API endpoint at `/api/v1/targets/relabel_steps` that takes a pool name
and a label set of a target and returns a detailed list of applied
relabeling rules and their output for each step.
* A "show relabeling" link/button for each target on the discovery page
that shows the detailed flow of all relabeling rules (based on the API
response) for that target.
Note that this changes the JSON encoding of the relabeling rule config
struct to output the original snake_case (instead of camelCase) field names,
and before merging, we need to be sure that's ok :) See my comment about
that at https://github.com/prometheus/prometheus/pull/15383#issuecomment-3405591487
Fixes https://github.com/prometheus/prometheus/issues/17283
Signed-off-by: Julius Volz <julius.volz@gmail.com >
2025-10-15 15:33:27 +02:00
Bryan Boreham
7056c70647
Merge pull request #16851 from jingchanglu/main
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
chore: fix some function names in comment
2025-09-30 12:54:48 +01:00
George Krajcsovits
979aea1d49
OTLP to directly write to an interface which can hide storage details ( #16951 )
...
* OTLP writer writes directly to appender
Do not convert to Remote-Write 1.0 protocol. Convert to TSDB Appender interface instead.
For downstream projects that still convert OTLP to something else (e.g. Mimir using
its own RW 1.0+2.0 compatible protocol), introduce a compatibility layer between
OTLP decoding and TSDB Appender. This is the CombinedAppender that hides the
implementation. Name is subject to change.
---------
Signed-off-by: David Ashpole <dashpole@google.com >
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com >
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com >
Co-authored-by: David Ashpole <dashpole@google.com >
Co-authored-by: Jesus Vazquez <jesusvazquez@users.noreply.github.com >
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
2025-09-08 14:34:25 +02:00
bwplotka
794bf774c2
Reapply "prw: use Unit and Type labels for metadata when feature flag is enabled ( #17033 )"
...
This reverts commit f5fab47577 .
2025-08-29 08:16:37 +01:00
bwplotka
f5fab47577
Revert "prw: use Unit and Type labels for metadata when feature flag is enabled ( #17033 )"
...
This reverts commit c808a71e18 .
2025-08-29 08:15:28 +01:00
Jonathan
c808a71e18
prw: use Unit and Type labels for metadata when feature flag is enabled ( #17033 )
...
* chore: send Unit and Type when feature flag is enabled
Signed-off-by: perebaj <perebaj@gmail.com >
* remove unused code and comments
Signed-off-by: perebaj <perebaj@gmail.com >
* remove unreal scenario
Signed-off-by: perebaj <perebaj@gmail.com >
* remove unused if
Signed-off-by: perebaj <perebaj@gmail.com >
* remove unused labels
Signed-off-by: perebaj <perebaj@gmail.com >
* linter
Signed-off-by: perebaj <perebaj@gmail.com >
* enable type and unit through remotewrite config
Signed-off-by: perebaj <perebaj@gmail.com >
* remove test comment and capture type and unit when flag is enabled
Signed-off-by: perebaj <perebaj@gmail.com >
* gofumpt
Signed-off-by: perebaj <perebaj@gmail.com >
* modelTypeToWriteV2Type
Signed-off-by: perebaj <perebaj@gmail.com >
* use NewMetadataFromLabels
Signed-off-by: perebaj <perebaj@gmail.com >
* capture feature flag from main
Signed-off-by: perebaj <perebaj@gmail.com >
* simplifying logic
Signed-off-by: perebaj <perebaj@gmail.com >
* remove unused function
Signed-off-by: perebaj <perebaj@gmail.com >
* formatting code
Signed-off-by: perebaj <perebaj@gmail.com >
* gofumpt
Signed-off-by: perebaj <perebaj@gmail.com >
* remove public var: EnableTypeAndUnitLabels
Signed-off-by: perebaj <perebaj@gmail.com >
* remove enableTypeAndUnitLabels from TestPopulateV2TimeSeries_typeAndUnitLabels
Signed-off-by: perebaj <perebaj@gmail.com >
* remove enableTypeAndUnitLabels from main
Signed-off-by: perebaj <perebaj@gmail.com >
* use schema helper to populate metadata
Signed-off-by: perebaj <perebaj@gmail.com >
* remove metadata since nil is the default value
Signed-off-by: perebaj <perebaj@gmail.com >
* add TestPopulateV2TimeSeries_UnexpectedMetadata
Signed-off-by: perebaj <perebaj@gmail.com >
* Update storage/remote/queue_manager_test.go
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
---------
Signed-off-by: perebaj <perebaj@gmail.com >
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com >
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com >
2025-08-29 04:10:01 +00:00
beorn7
747c5ee2b1
Apply analyzer "modernize" to the whole codebase
...
See
https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
for details.
This ran into a few issues (arguably bugs in the modernize tool),
which I will fix in the next commit, so that we have transparency what
was done automatically.
Beyond those hiccups, I believe all the changes applied are
legitimate. Even where there might be no tangible direct gain, I would
argue it's still better to use the "modern" way to avoid micro
discussions in tiny style PRs later.
Signed-off-by: beorn7 <beorn@grafana.com >
2025-08-27 14:48:41 +02:00
Justin Jung
0f98dcbc07
Engine: Allow error response code to be customized ( #16257 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
Stale Check / stale (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Currently the API always returns http code 422 for engine execution error, and
This PR allows the error code to be overriden, based on the ErrorType and the error itself.
Signed-off-by: Justin Jung <jungjust@amazon.com >
Signed-off-by: Justin Jung <justinjung04@gmail.com >
Co-authored-by: Ayoub Mrini <ayoubmrini424@gmail.com >
2025-08-19 16:43:47 +01:00
Arve Knudsen
0a40df33fb
Make metric/label name validation scheme explicit ( #16928 )
...
buf.build / lint and publish (push) Has been cancelled
CI / Go tests (push) Has been cancelled
CI / More Go tests (push) Has been cancelled
CI / Go tests with previous Go version (push) Has been cancelled
CI / UI tests (push) Has been cancelled
CI / Go tests on Windows (push) Has been cancelled
CI / Mixins tests (push) Has been cancelled
CI / Build Prometheus for common architectures (0) (push) Has been cancelled
CI / Build Prometheus for common architectures (1) (push) Has been cancelled
CI / Build Prometheus for common architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (0) (push) Has been cancelled
CI / Build Prometheus for all architectures (1) (push) Has been cancelled
CI / Build Prometheus for all architectures (10) (push) Has been cancelled
CI / Build Prometheus for all architectures (11) (push) Has been cancelled
CI / Build Prometheus for all architectures (2) (push) Has been cancelled
CI / Build Prometheus for all architectures (3) (push) Has been cancelled
CI / Build Prometheus for all architectures (4) (push) Has been cancelled
CI / Build Prometheus for all architectures (5) (push) Has been cancelled
CI / Build Prometheus for all architectures (6) (push) Has been cancelled
CI / Build Prometheus for all architectures (7) (push) Has been cancelled
CI / Build Prometheus for all architectures (8) (push) Has been cancelled
CI / Build Prometheus for all architectures (9) (push) Has been cancelled
CI / Report status of build Prometheus for all architectures (push) Has been cancelled
CI / Check generated parser (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
CI / fuzzing (push) Has been cancelled
CI / codeql (push) Has been cancelled
CI / Publish main branch artifacts (push) Has been cancelled
CI / Publish release artefacts (push) Has been cancelled
CI / Publish UI on npm Registry (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Sync repo files / repo_sync (push) Has been cancelled
* Parameterize metric/label name validation scheme
Parameterized metric/label name validation scheme
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
Co-authored-by: Julius Hinze <julius.hinze@grafana.com >
2025-08-18 08:09:00 +00:00
Bartlomiej Plotka
5df982538f
Merge pull request #16994 from mmorel-35/unused-parameters
...
chore: enable unused-receiver rule from revive
2025-08-06 10:46:28 +01:00
Matthieu MOREL
9f782164b4
chore: enable fatcontext linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2025-08-04 18:24:10 +02:00
Matthieu MOREL
cef219c31c
chore: enable unused-receiver rule from revive
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2025-08-04 09:43:33 +00:00
Julius Volz
2e709c6567
Merge pull request #16695 from sujalshah-bit/block_endpoint
...
api: Create `/status/tsdb/blocks` endpoint.
2025-07-31 18:15:49 +02:00
Arthur Silva Sens
2c04f2d7b1
PROM-39: Add type and unit labels to OTLP endpoint ( #16630 )
...
* PROM-39: Add type and unit labels to OTLP endpoint
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* Extract label addition into helper function
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* Wire feature flag and web handler configuration
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* Use lowercase for units too
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* Use otlptranslator.UnitNamer to build units
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* Address copilot's comment
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* Verify label presence before adding them
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* Overwrite type/unit labels when already set
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* sed/addTypeAndUnitLabels/enableTypeAndUnitLabels/
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
* Reduce duplicated code
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
---------
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com >
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
2025-07-25 08:53:13 -03:00
jingchanglu
9ddb21fccb
chore: fix some function names in comment
...
Signed-off-by: jingchanglu <jingchanglu@outlook.com >
2025-07-10 14:43:25 +08:00
Arve Knudsen
f561aa795d
OTLP receiver: Generate target_info samples between the earliest and latest samples per resource ( #16737 )
...
* OTLP receiver: Generate target_info samples between the earliest and latest samples per resource
Modify the OTLP receiver to generate target_info samples between the earliest
and latest samples per resource instead of only one for the latest timestamp.
The samples are spaced lookback delta/2 apart.
---------
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2025-07-04 14:38:16 +00:00
sujal shah
4408a6bcaf
api: Create /status/tsdb/blocks endpoint.
...
this endpoint serves blocks data to the client.
Signed-off-by: sujal shah <sujalshah28092004@gmail.com >
2025-07-04 03:13:54 +05:30