63 Commits
Author SHA1 Message Date
lean.dev 7d5b6f48ce chore: improve logs for Loki client (#130520) 2026-08-11 19:16:22 +01:00
lean.dev a051f2548d Docs: document the tracing file exporter (#129339)
Companion to #128679.
2026-07-28 15:05:51 +01:00
lean.devandClaude Opus 4.8 a10320a7f2 Tracing: add file exporter to write traces as OTLP/JSON (#128679)
* Tracing: add file exporter to write traces as OTLP/JSON

On-prem operators can share metrics and logs with support easily, but capturing
Grafana's own traces required standing up an OTEL collector and a trace backend
(Tempo/Jaeger). This adds a `file` exporter that writes Grafana's traces to a
local OTLP/JSON file, so an operator can enable it, reproduce an issue, and hand
the file to support with no extra infrastructure. The file is spec-compliant
OTLP/JSON (hex-encoded IDs) and can be visualised directly in Grafana Explore's
"Import trace".

The exporter is off by default and only activates when
[tracing.opentelemetry.file] path is set and no jaeger/otlp endpoint is
configured. Captures are bounded by size and duration (whichever trips first) to
protect the host disk, the file is created owner-only, and any setup failure
disables the exporter rather than blocking startup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: trigger CI

* Tracing: document Windows limitation of capture file permissions

The 0600 mode on the trace capture file is only effective on Unix; on
Windows the permission bits map to the read-only attribute and effective
access is governed by ACLs inherited from the capture directory. Scope
the confidentiality claim accordingly — operators provision the capture
directory, so its ACLs are the access boundary on Windows.

* Tracing: skip span encoding once the trace capture has ended

After the size or duration cap tripped, every exported batch was still
converted proto -> pdata -> OTLP/JSON before being discarded by the
closed writer, and with the exporter's always-on sampling that cost was
paid for the rest of the process lifetime. Check the writer state first
so post-capture batches are dropped before any encoding happens.

* Tracing: never block startup on a file exporter setup failure

Writer and exporter-client failures already degraded the file exporter
to noop, but sampler and tracer-provider initialization errors still
returned from ProvideService and could prevent Grafana from starting
over an optional support capture. Route those paths through the same
graceful-disable helper (shutting down the already-open exporter) and
add an invalid-sampler regression test.

* Tracing: roll back partial records and end capture on write errors

A transient write failure (e.g. disk full) could leave a partially
written record in the capture file; later batches then appended after
the malformed line, corrupting the remainder of the file — and strict
JSONL consumers reject the whole capture over a single bad line. On any
write error, truncate the file back to the last committed offset and
terminate the capture so the output always remains valid OTLP/JSON.

The writer's file handle is narrowed to a small interface so the
rollback path is testable with a fake failing file.

* chore: trigger CI

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-27 17:39:59 +01:00
lean.dev d62a11a894 AuditLogProcessor: update enterprise import (#116498)
* AuditLogProcessor: update enterprise imports

* un-remove comment

* updating go.mod
2026-01-20 10:16:27 +01:00
lean.dev c6fe19b472 FeatureToggleAdminPage: fix owner of feature toggle (#111172) 2025-09-16 13:12:23 +01:00
lean.dev c52eedbf23 CloudMigration: fix flacky test (#111046) 2025-09-12 19:46:11 +00:00
lean.dev b1a059ac4e CloudMigrations: wrap assert in EventuallyWithTf in case async sync hasnt finished (#110777)
* CloudMigrations: wrap assert in EventuallyWithTf in case async sync hasnt finished

* fix

* fix
2025-09-09 12:05:10 +01:00
lean.dev 21fc58f632 SecretsManager: fix span name for SetVersion operations (#110035)
SecretsManager: fix span name for SetVersion operations
2025-08-22 12:01:41 +00:00
lean.dev 3106abf1a6 SecretsManager: clear unused metrics and standarize labels(#109515) 2025-08-13 14:01:50 +01:00
lean.dev e022b6593b SecretsManager: fix log (#108970) 2025-07-31 11:51:04 +00:00
lean.dev 6bf542889a SecretsManager: Refactor and clean metrics (#108908) 2025-07-30 20:00:30 +01:00
lean.dev 69743ed1a4 SecretsManager: remove unused metric (#108694) 2025-07-25 14:04:43 +00:00
lean.dev 06223868b9 Chore: rename licensing action (#105143) 2025-05-20 15:24:06 +01:00
lean.dev b3209b1e01 CloudMigrations: Remove onPremToCloudMigrationsAuthApiMig feature flag (#99368) 2025-01-24 13:53:58 -03:00
lean.dev edae283817 Chore: avoid redirect in test (#96917) 2024-11-25 08:54:42 -03:00
lean.dev e9fae5bd7f CloudMigration: Create authapi service (#96581) 2024-11-21 20:46:06 +02:00
lean.dev 750a0bed71 MigrationAssistant: Restrict dashboards, folders and datasources by the org id of the signed in user (#96339)
apply security patch: main/206-202410241510.patch
2024-11-12 13:03:16 -06:00
lean.dev 3438196010 Anonymous User: Adds validator service for anonymous users (#94700) 2024-10-18 13:10:41 -03:00
lean.dev 5522c3a01b Grafana: Adds support for PKCS1 encrypted certs (#93451) 2024-09-19 15:03:06 -03:00
lean.dev e20c7342a9 CloudMigration: Removes snapshot and resources when deleting a session (#91548) 2024-08-09 16:42:45 +03:00
lean.dev b5e32b31b1 Grafana: Enables use of encrypted certificates with password for https (#91418) 2024-08-06 19:18:32 -03:00
lean.dev 235f223aef CloudMigrations: Fix typo in trace name (#91261) 2024-07-31 10:24:40 -03:00
lean.dev d8555019f1 CloudMigrations: Fix migration in docker (#91147) 2024-07-29 15:00:43 -03:00
lean.dev 7839903fef CloudMigrations: Sets default grafana domain to prod (#90526) 2024-07-17 10:48:23 -03:00
lean.dev 330da7916d Chore: Add unit test for cloudmigration package (#88868) 2024-06-07 13:46:19 -03:00
lean.dev 639ab6cca7 Tempo: Implement PDC for gRPC client (#85867) 2024-05-15 14:39:02 +02:00
lean.devandMichael Mandrus b009536329 Caching: Implement mtls-enabled memcached integration (#84171)
* fix merge

* fix conflicts

* updating generated feature toggle code

* Fix go mod owner

* fix merge

* add dependency

* fix dependencies

* workspace sync

* go get

* work sync

* trying something

* fix

* add docs for tls config

* work sync

* adjust go mod

* try something

* move import to the correct file

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2024-05-09 15:12:08 -04:00
0719f73f35 Cloud Migration: Remove ID migration in favor of UID (#86550)
* - Added migration to add a new collumn UID to both migration and migration_run tables.
- Added migration to set UID for records already existent in the database before adding a new column.
- Added UID field to CloudMigration and CloudMigrationRun dtos (model.go)

* Fix db migration

* Updating store and model

* Updating API to use UID

* fix typo

* update openapi specs and generated endpoints

* fix spec

* update openapi specs and generated endpoints

* Fixing db mapping

* Fix frontend

* fix migration

* remove migration uid from run fetch endpoint

* Revert "merge"

This reverts commit d654e4c530, reversing
changes made to 5fe0b483eb.

* manual merge

* rename some funcs for consistency

* make interfaces consistent

* validate uids

* update generated frontend api

* fix enterprise spec

* manually resolve api

* try again

* try yet again

* once more

---------

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
2024-05-01 12:29:25 -04:00
lean.dev c8d185502b Fixes CMS url for dev environment (#86056) 2024-04-12 14:19:38 +00:00
lean.dev 5b147d0847 CloudMigration: Add service to list all migrations (#85308) 2024-03-28 08:50:31 -03:00
lean.devandDave Henderson 8336f1fc1e Update feature toggle code owner (#84817)
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2024-03-20 18:06:14 +01:00
lean.dev f23b993014 CloudWatch: Only override contextDialer when using PDC (#80992) 2024-02-02 15:45:57 -03:00
lean.dev 7ab833d28c Licensing: Redact license when overriden by env variable (#81726) 2024-02-01 14:37:36 -03:00
lean.dev 021aca256c Fix typos (#81270) 2024-01-25 15:20:20 +00:00
lean.dev 48b6e894ca Licensing: Update enterprise documentation (#78276)
* Update enterprise documentation
* Update docs/sources/administration/enterprise-licensing/_index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-11-16 16:13:56 +02:00
lean.dev 091f54bf20 Chore: Bump grafana-plugin-sdk-go to v0.179.0 (#75886) 2023-10-03 12:54:17 -03:00
lean.dev 5e0b20266e Licensing: Pass func to update env variables when starting plugin (#74620) 2023-09-11 09:33:10 -03:00
lean.dev 0b0140b761 Licensing: Send the app url to plugin (#64258) 2023-03-08 14:44:04 -03:00
lean.devandChristopher Moyer 75ffbe422b Snapshots: Add new snapshot configuration to documentation (#62110)
* Add new snapshot configuration to documentation
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-01-26 11:06:35 -03:00
lean.dev 7d8ec6199d Snapshots: Add snapshot enable config (#61587)
* Add config to remove Snapshot functionality (frontend is hidden and validation in the backend)
* Add test cases
* Remove unused mock on the test
* Moving Snapshot config from globar variables to settings.Cfg
* Removing warnings on code
2023-01-26 10:28:11 -03:00
lean.dev 88f5ed0faf Chore: update latest.json to 9.2.5 (#58860) 2022-11-16 13:42:38 -05:00
lean.dev 83bd57244d Chore: Update version (#58750) 2022-11-15 10:03:05 -03:00
lean.devandChristopher Moyer c1b10e4f0c Docs: Adding documentation for custom branding on public dashboards (#58090)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-03 14:58:43 -03:00
lean.dev 49e36c5c05 Public Dashboards: Renaming PubdashFooter (#58137) 2022-11-03 10:12:27 -03:00
lean.devandjuanicabanas d5a92e8f42 Public Dashboards: Extracting config of Public Dashboard (#57788)
Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
2022-11-02 14:32:29 -03:00
lean.dev 654db452cd Public Dashboards: Fixing annotations validations for public dashboards (#57455) 2022-10-21 12:06:39 -03:00
lean.dev 552d9d70eb PublicDashboards: Validate access token (#57298)
Adding validation for access token
2022-10-20 16:43:33 -03:00
lean.devandChristopher Moyer 356318e387 Docs: Updating Public Dashboard documentation (#56504)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-06 17:47:38 -03:00
lean.dev 7bd8dbf2f8 Docs: Update Public Dashboard documentation (#56035) 2022-09-29 14:24:38 -03:00
lean.dev 3ab4d543d4 GrafanaUI: Add icon to links on Plugin configuration page (#55581) 2022-09-22 14:16:45 -03:00
lean.dev c8f2cd2599 Fixing swagger meta preventing spec generation (#54181) 2022-08-24 16:56:28 -03:00
lean.dev 92d0420a45 Adding logs during migration of secrets to plugin (#53426) 2022-08-10 16:23:55 -03:00
lean.dev 07681a737d Add LockExecuteAndRelease method to ServerLockService (#53417) 2022-08-10 10:28:25 -03:00
lean.dev e8e7b59bb0 Implementing OpenApi 3 specs (converted from Swagger 2) (#53243)
* Adding OpenApi target to makefile, to covert swagger spec into OpenAPI 3
* Adding endpoint to server swaggerui with new openapi3 specs
* Passing output file as parameter for OpenApi3 specs
* Implement workaround for missing host and prefix domain
2022-08-04 13:51:12 -03:00
lean.dev 3395981d35 Chaging log level when secret is not found (#53007) 2022-08-01 09:25:24 -03:00
lean.dev e1785f4eb4 Secret migration from Sql KV Store to Secret Plugin (#52191)
* Created PluginSecretMigrationService to be able to migrate from the secrets table from the database to the secret plugin. Added migration which takes all the secrets at the sql store and stores it in the plugin. Then deletes all the secrets from the sql
* Added secretsKVStoreSQL.GetAll() method to return all the secrets at the sql table
* Renaming kvstore_test.go as sql_test.go, adding GetAll test case. Fixing decryption of keys
2022-07-19 14:42:23 -03:00
lean.dev b9cce18f72 Bumping protobufjs version (#50435) 2022-06-08 12:00:36 -03:00
lean.dev 600ad35978 Upgrading version of github.com/tidwall/match to v1.1.1 (#47996)
To fix CVE-2020-26066 security issue
2022-04-21 10:47:03 -03:00
lean.dev c3ee98a9b6 Fixing delete dashboard url form datasource configuration (#46637) 2022-03-18 11:47:57 -03:00
lean.dev b2e6ca9393 Deleting empty lines at list (#45610) 2022-02-18 11:08:52 -05:00
lean.devandFiona Artiaga a0b29a960b Caching: Adding comment about resource caching (#45151)
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2022-02-18 09:49:26 -03:00
lean.dev 79bf0fc3d1 Fixing login request in loadtest (#43750) 2022-01-11 10:35:02 -03:00
lean.dev 1ee34fb90a Fixing documentation for query caching plugin: steps duplicated (#42392) 2021-11-26 19:15:45 +01:00