8 Commits

Author SHA1 Message Date
Sophie Waldman
98b411a649 chore(linter): Fix issues flagged by updated golangci-lint version (#19206) 2025-09-15 16:58:01 -04:00
Ed Welch
ad0bef31e7 chore: improve logging of push request streams (#17872)
Signed-off-by: Ed Welch <ed@edjusted.com>
Co-authored-by: Paul Rogers <129207811+paul1r@users.noreply.github.com>
2025-06-02 10:02:04 -04:00
Paul Rogers
40ee766724 feat: Collect duplicate log line metrics (#13084) 2024-06-26 08:31:40 -04:00
Ed Welch
d39dc09ca6 refactor!: refactor how we do defaults for runtime overrides (#12448)
Signed-off-by: Edward Welch <edward.welch@grafana.com>
Co-authored-by: Dylan Guedes <djmgguedes@gmail.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
2024-04-03 14:35:22 -04:00
Karsten Jeschkies
9a2e00bc17 refactor: Replace TenantConfig method with interface. (#12260)
**What this PR does / why we need it**:
This change allows the retrieval of the `TenantConfig` or the `DefaultConfig`. It also defines an interface instead of a tenant config function which makes it a little easier to grok the code.

Eventually this will enable us to introduce GEL specific configurations.

**Checklist**
- [ ] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**)
- [ ] Documentation added
- [x] Tests updated
- [ ] `CHANGELOG.md` updated
  - [ ] If the change is worth mentioning in the release notes, add `add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in `production/helm/loki/Chart.yaml` and update `production/helm/loki/CHANGELOG.md` and `production/helm/loki/README.md`. [Example PR](d10549e3ec)
- [ ] If the change is deprecating or removing a configuration option, update the `deprecated-config.yaml` and `deleted-config.yaml` files respectively in the `tools/deprecated-config-checker` directory. [Example PR](0d4416a4b0)
2024-03-19 13:34:00 +00:00
Dylan Guedes
7d67b6306f Loki: Implement initial phase of limited_log_push_errors (#9556)
**What this PR does / why we need it**:
Adds an initial implementation of `limited_log_push_errors`.
This initial implementation encompass:
- Runtime per-tenant configuration
- Simple per-tenant rate-limiting based on error message size

Notable features that will be added in future phases:
- Instead of a single error with the final string, give to the manager
the list of all entries
- Once it supports per-entry error, make the rate-limiting separated
per-reason
- Hash the entry error and avoid repeating errors by caching seen errors
in memory
2023-05-31 18:43:37 -03:00
Dylan Guedes
3941767c6f Loki: Introduce new limited_log_push_errors. (#9568)
**What this PR does / why we need it**:
Introduce a new configuration named `limited_log_push_errors` that will
be implemented.
The configuration is being introduced on a separated PR to facilitate
future rollbacks.

**Which issue(s) this PR fixes**:
N/A
2023-05-30 16:47:12 -03:00
Ed Welch
6e67d1ea5d Loki/Promtail: Client Refactor (#3623)
* move docker driver

* move fluent-bit output plugin

* move fluentd plugin

* move logstash plugin

* move promtail

* match stage uses simple logql label matcher and filter expressions only

* remove remaining logql imports

* remove helpers package and move contents to util package

* move validation and runtime out of util package

* fix imports

* move build and cfg packages into util

* move ParseRequest function to util package

* create a new package for logql models and move marshal/unmarshal code to util folder

* move ErrorLabel to logqlmodel

* move stats package to logqlmodel

* decouple loghttp from logql by moving validation to logql package

* move gcplog to tools

* move PackedEntryKey constant to logqlmodel

* fix stats proto import and rebuild protos

* fix windows promtail tests

* update drone to new dockerfile locations
2021-04-19 15:51:47 -04:00