* Support PDC for Influx SQL
* Correctly set the gRPC transport creds dial option
* Logging and refactor
* Allow URLs with no scheme
* Use passthrough resolver for socks proxy
* Update comment
* Extract url parsing and add test
* Check err
This adds more checks on the type of errors returned from InfluxDB fsql
datasource queries. Grpc errors with code `InvalidArgument`, `PermissionDenied`
and `NotFound` are mapped to downstream errors.
- Add frame type So SQL expressions knows how to convert it
- No FrameType version so how other expressions do not change how they handle it, and continue to catch the special graphite handling in SSE convert
Fixes#100545
Streaming queries/metrics do not work if TLS is enabled and basic auth is not.
"Save & test" while adding/editing a tempo datasource throw `e.data is undefined` in the ui.
Gafana server logs report:
> logger=grafana-apiserver t=2025-02-12T17:55:29.131036665Z level=info msg="[core] [Channel #42 SubChannel #43]grpc:
> addrConn.createTransport failed to connect to {Addr: \"tempo:3200\", ServerName: \"tempo:3200\", }. Err: connection
> error: desc = \"error reading server preface: read tcp 127.0.0.1:55432->127.0.0.1:3200: read: connection reset by
> peer\""
> logger=grafana-apiserver t=2025-02-12T17:55:36.835523455Z level=info msg="[core] [Channel #31 SubChannel #32]grpc:
> addrConn.createTransport failed to connect to {Addr: \"tempo:3200\", ServerName: > \"tempo:3200\", }. Err: connection
> error: desc = \"error reading server preface: EOF\""
Fix by using TLS when enabled regardless of basic auth settings.
Co-authored-by: André Pereira <adrapereira@gmail.com>
* CI: Allow Bench conversion to fail
We shouldn't mark PRs and commits as X if they fail to convert logs with Bench.
* Fix: Prints should always include new lines
* fix: remove unused import
InfluxDB Flux queries can return a http.Error type that we can use to
assign errorsource to.
This PR checks for that type of error, and uses our errorsource
machinery to assign an errorsource.
This is part of https://github.com/grafana/data-sources/issues/377
* Update dashboard app to use app SDK v0.35.0
What
This change updates dashboard app to use app SDK v0.35.0 and adds new
Makefile target for running codegen for all apps, in opt-in manner.
Currently only dashboards app is opted in.
Additionally, this changes dashboard app Makefile to properly install
and update app SDK versions when generating code, with app SDK version
pinned in the Makefile itself.
Why
The upgrade addresses issues with `DeepCopy` methods, while the Makefile
targets ensure that codegen is easy to run and uses reproducible
environments.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Run make update-workspace
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Fix deepcopy methods
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Re-run CUE codegen to satisfy the CI
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Run make update-workspace
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Update to v0.35.1
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Remove aggregate by
* Update betterer
* Run toggles test
* Add back group by in schema so it can be checked for
* Show error if group by
* Update error message
* Allow user to remove the group by from the query
* Fix assertion
---------
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Update to latest cog version and update workspaces
* Update generated go files
* Try to avoid concurrency issues
* Update workspaces
* Try to remove the sync...
* Remove grafana dependency from xorm go.mod file
* cloudmigration/cloudmigrationimpl: run integration tests in parallel
* tsdb/mysql: run tests with actual service and instance manager
* pluginsintegration/angulardetectorsprovider: reduce job interval in test
* util: extract test that should only be ran with -race enabled and unskip it
* Add version 2.4 to frontend
* Update settings and types
- Set all properties on backend for consistency
* Update query logic to parse new and old format
- Minor naming updates
- Extract logic for initial frame creation
- When parsing old api responses, ensure data is in ascending order
- Update tests
* Update docs and provisioning file
* Fix lint
* Update docs/sources/datasources/opentsdb/_index.md
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
* Update docs/sources/datasources/opentsdb/_index.md
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
* Review nit
---------
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
This PR adds errorsource attribution to the influxql and flux query paths
when the query model cannot be parsed, which is a user error.
It also catches cases where the datasource configuration does not
contain a scheme or host, and adds downstream attribution to those
errors.
Error handling on the influxql query path is updated to match 'all errors
are per query, and stashed on the response object' pattern.
Fixes https://github.com/grafana/oss-plugin-partnerships/issues/1250
* SQL data sources: Use correct error source for sql processing errors
* Fix lint
* Fix cyclomatic complexity
* Nit rename variable to make it more clear what those errors are
When introducing errorsource over in:
https://github.com/grafana/grafana/pull/99900
I introduced a bug - trying to use a http response with a non-nil error.
In that case, the response is nil, so code panics.
This PR removes that check.
* TraceQL metrics streaming POC
* Reduce duplicate frames by using scan() and combineResponses()
* Trying to remove samples outside of time range
* Remove code to clean out of range
* Metrics streaming config toggle
* Sync opening the search and metrics options
* Fix tests
* Fix issues after conflicts
* Fix tests
* Use absolute value when computing minXDelta
* Revert last commit
* Fix frame sorting
* Remove all duplicates
* Use fields from schema to get the frames
* Use FieldCache
* Address PR comments
This PR adds `backend.ErrorSourceDownstream` values to all `backend.DataResponse`
values where it's certain that the error wasn't the result of the
InfluxDB datasource plugin.
* Improve resource request error handling
- Correctly parse JSON responses
- Log erroneous failures in JSON marshalling/unmarshalling
- Correctly set response status code
- Do not attempt to use the response writer as it will be nil
* Minor change
* Improve type assertion handling
* 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
* Add support for exemplars
* TraceQL metrics exemplars ftw
* Fix exemplars on histogram queries
* Added exemplars field for the query builder options
* Add series labels as exemplars dataframe fields so the panel can link series with exemplars
* Fix tests
* Fix lint
* Hide exemplars field from options
* Fix crash on histogram queries
* Use DataTopicAnnotations enum
* Fix test