35 Commits

Author SHA1 Message Date
8fdf86e56f Profiles: Stop passing response headers for Grafana-Pyroscope and parca datasources (#106577)
* Revert "pkgs/tsdb/[grafana-pyroscope-datasource|parca]: Fix use of request headers in responses"

This reverts commit 8bac68e906bbb6d075da45397014fb7091fbab23.

* Profiles: Stop passing request/response headers to the backend
2025-06-11 18:34:21 +01:00
549511597c Datasource: grafana-pyroscope-datasource/parca: Fix the passing of response headers (#106293)
pkgs/tsdb/[grafana-pyroscope-datasource|parca]: Fix use of request headers in responses

In the parca and the grafana-pyroscope-datasource we were wrongly using the request headers instead of the response
header when communication the results to the backend.

This PR fixes this bug.

Was reported by an user via community slack, who faced issues, with a request header of `content-length: 0` being
inserted by a intermediate proxy.
2025-06-09 09:43:34 +00:00
30dc3a3ce4 Datasource/grafana-pyroscope: Do healthcheck on a window without data (#106312)
This will makes the healthcheck cheaper to anwser, as we would not expect data at this time window.

Fixes #106311
2025-06-06 08:29:31 +01:00
0b8252fd7c Pyroscope: Annotation support for series queries (#104130)
* Pyroscope: Add annotations frame to series response

* Adapt to API change, add tests

* Run make lint-go

* Fix conflicts after rebase

* Add annotation via a separate data frame

* Process annotations fully at the datasource

* Add mod owner for go-humanize

* Pyroscope: Annotations in Query Response can be optional

---------

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2025-05-28 10:42:19 +02:00
d4c446f42c Chore: Update k8s.io to v0.33.1 (#105307) 2025-05-28 00:13:18 +03:00
757be6365a CI: Bump golangci-lint to 2.0.2 (#103572) 2025-04-10 14:42:23 +02:00
7151ea6abc Codegen: Generate Golang code using cog (#98812)
* Use cog for Go types

* Delete old generation code

* Fix plugins generation

* workspaces update

* Update datasources with new generated code

* More fixes

* Update swagger and openapi specs

* Fixes

* More files...

* Update workspace

* More fixes...

* Remove unused functions
2025-01-14 15:58:38 +01:00
9525891455 Pyroscope: Add limit number of series returned by the data source (#95780) 2024-11-08 17:22:29 +02:00
29d4f6a217 Datasource: Change query filtering (#84656)
* call filterQuery from queryrunner

* test query hide filtering

* fix more broken tests

* lint errrors

* remove redundant filterQuery call

* skip filter in variable queries

* fix broken cypress test

* change tooltip text

* fix translations

* fix comments

* do not execute query is targets are empty

* add more tests

* remove unsued import

* update translations

* revert id change

* change header text

* update comment for hide prop

* rename hide query prop

* change tooltip and introduce different toggle state text

* update tests

* update comment and regenerate types

* run extract again

* fix broken e2e test

* track event

* fix build issues

* revert changes in wire file
2024-03-21 13:39:39 +01:00
473898e47c Core: Remove thema and kindsys dependencies (#84499)
* Move some thema code inside grafana

* Use new codegen instead of thema for core kinds

* Replace TS generator

* Use new generator for go types

* Remove thema from oapi generator

* Remove thema from generators

* Don't use kindsys/thema for core kinds

* Remove kindsys/thema from plugins

* Remove last thema related

* Remove most of cuectx and move utils_ts into codegen. It also deletes wire dependency

* Merge plugins generators

* Delete thema dependency 🎉

* Fix CODEOWNERS

* Fix package name

* Fix TS output names

* More path fixes

* Fix mod codeowners

* Use original plugin's name

* Remove kindsys dependency 🎉

* Modify oapi schema and create an apply function to fix elasticsearch errors

* cue.mod was deleted by mistake

* Fix TS panels

* sort imports

* Fixing elasticsearch output

* Downgrade oapi-codegen library

* Update output ts files

* More fixes

* Restore old elasticsearch generated file and skip its generation. Remove core imports into plugins

* More lint fixes

* Add codeowners

* restore embed.go file

* Fix embed.go
2024-03-21 11:11:29 +01:00
5b085976bf Pyroscope: Fix template variable support (#84477) 2024-03-18 14:25:47 +01:00
0913324668 Chore: Remove repetitive words (#84132)
remove repetitive words

Signed-off-by: carrychair <linghuchong404@gmail.com>
2024-03-11 08:55:18 -04:00
6796e66fb8 Pyroscope: Add standalone build (#80222)
* Pyroscope standalone build

* Fix for tests

* Add missing packages

* Remove import

* Update trace to profiles

* Update test
2024-01-16 12:46:15 +00:00
81f8c022a0 Pyroscope: Decouple backend from infra imports (#80018)
Decouple backend from infra imports
2024-01-08 13:11:46 +00:00
e64cb8541f Pyroscope: Send start/end with profile types query (#77523) 2024-01-04 16:35:47 +01:00
00bc13e37c Pyroscope: Remove unnecessary import and logic (#79568)
* Remove unecessary import and logic

* Update test
2024-01-03 11:25:38 +00:00
e00e4d9ec6 Pyroscope: Switch to sdk httpclient from infra httpclient (#79373)
Decouple httpclient
2023-12-12 11:14:26 +00:00
1c53561521 Pyroscope: Improve label suggestions in query editor (#78861)
* Send sanitized selectors to the Pyroscope backend for LabelNames and LabelValues

* Clean LabelNames response to remove already used labels

* Improve performance after major changes

* Fix import order

* Further improve rendering performance

* Fix frontend tests

* Fix fake pyroscope client signature

* Bump pyroscope/api dependency to include start/end in LabelNames/LabelValues

* Fix issue with old queries running when using the run button

* Add generated file

* Make code more readable, add a few comments

* Format with prettier

* Fix error when assigning data

* Revert "Add generated file"

This reverts commit c4f33727b8db6b934d14a3a0dfb6f4ce4174a406.

* Remove leftover code

* Simplify query editor internal state objects

* Move label selector validation up, improve label filtering

* Simplify query editor state, switch to debounce to reduce rerenders

* Revert cosmetic change
2023-12-07 18:11:30 +01:00
c39e9a8f52 Tracing: Trace to profiles (#76670)
* Update Tempo devenv to include profiles

* Update devenv to scrape profiles from local services

* Cleanup devenv

* Fix issue with flame graph

* Add width prop to ProfileTypeCascader

* Add trace to profiles settings

* Add new spanSelector API

* Add spanSelector to query editor

* Update span link query

* Conditionally show span link

* Combine profile and spanProfile query types and run specific query type in backend based on spanSelector presence

* Update placeholder

* Create feature toggle

* Remove spanProfile query type

* Cleanup

* Use feeature toggle

* Update feature toggle

* Update devenv

* Update devenv

* Tests

* Tests

* Profiles for this span

* Styling

* Types

* Update type check

* Tidier funcs

* Add config links from dataframe

* Remove time shift

* Update tests

* Update range in test

* Simplify span link logic

* Update default keys

* Update pyro link

* Use const
2023-11-01 10:14:24 +00:00
f8912517e6 Improve logs for backends owned by the Observability Traces and Profiling squad (#76109) 2023-10-31 11:57:17 +01:00
9d92818cae Plugins: Update PDC pattern from latest plugin SDK changes (#76576)
* update with sdk

* do sql

* fix core plugins

* fix proxy settings

* bump SDK version

* tidy

* enable pdc for test

* add codeowners

* bump dep

* go mod tidy

* bump SDK
2023-10-16 16:40:04 +02:00
91cf4f0c1c Revert "Plugins: Update PDC pattern from latest plugin SDK changes" (#76565)
Revert "Plugins: Update PDC pattern from latest plugin SDK changes (#76036)"

This reverts commit 151f6d6216e5e93edf56e4bbc6d3bfa5e0690b45.
2023-10-13 12:35:16 -04:00
151f6d6216 Plugins: Update PDC pattern from latest plugin SDK changes (#76036)
* update with sdk

* do sql

* fix core plugins

* fix proxy settings

* bump SDK version

* tidy

* enable pdc for test

* add codeowners
2023-10-13 14:42:15 +02:00
30cb720da5 Chore: Add tracing to tempo, parca and pyroscope datasource backends (#76368)
* Added spans to trace.go

* Added spans to search_stream.go

* Added spans to parca datasource

* Added spans for pyroscope

* Fix tests

* Fix another test

* Lint

* Revert "Fix another test"

This reverts commit a1639049e3bce19342b6a68c0e9a6d78f0332c0e.

* Use grafana-sdk-go tracing
2023-10-13 13:13:51 +01:00
2a6c16d969 Pyroscope: Change phlare/api module to pyroscope/api module (#76271) 2023-10-10 18:13:14 +02:00
1cbae72a9e Pyroscope: Fix backend panic when querying out of bounds (#76053) 2023-10-06 15:03:20 +02:00
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
15e54df9f2 Pyroscope: Remove "phlare" from variable, types, strings etc (#75140) 2023-09-20 16:31:22 +02:00
f7aab06e23 Pyroscope: Remove support for old pyroscope (#74683) 2023-09-19 10:09:28 +02:00
93cdc94a94 Chore: capitalise logs in other backend packages (#74344)
* capitalise logs in observability logs

* capitalise oss-bit-tent packages

* capitalise logs in aws-datasources

* capitalise logs for traces and profiling

* capitalise logs for partner datasources

* capitalise logs in plugins platform

* capitalise logs for observability metrics
2023-09-04 22:25:43 +02:00
025b2f3011 Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
689d9ed430 Pyroscope: Fix panic on query when symbol names are repeating (#72188)
Use EnumItemIndex type in values map
2023-07-24 13:06:38 +02:00
8c86a46440 Phlare: Set enum field type to enum instead of integer (#72078)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2023-07-21 13:08:23 -05:00
0316350d16 Codegen: Generate any instead of interface{} (#70201)
* Chore: Update thema to latest

* Regenerate
2023-06-16 10:54:56 +02:00
e17ef5e504 Pyroscope: Rename phlare to grafana-pyroscope-datasource (#68859) 2023-06-07 06:09:29 +03:00