-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[exporter/loki] Refactor the Loki exporter (#13572)
This commit brings a new implementation of the Loki exporter while maintaining compatibility with the previous version (called "legacy" in this PR). The new exporter has a cleaner logic, allowing the Loki labels to be configured as part of the data points instead of being part of the static configuration. This will be useful in the future when migrating from the Loki exporter to a native OTLP endpoint in Loki. Fixes #12873 Signed-off-by: Juraci Paixão Kröhling <[email protected]>
- Loading branch information
1 parent
7d1f90a
commit adc8fdf
Showing
28 changed files
with
1,706 additions
and
839 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Contributing to the Loki Exporter | ||
=== | ||
|
||
In order to contribute to this exporter, it might be useful to have a local setup of Loki, or a free account | ||
at Grafana Labs. | ||
|
||
Local Loki | ||
--- | ||
|
||
* Download and unpack the Loki package on a local directory, like `~/bin` | ||
* Download a [config file](https://raw.githubusercontent.com/grafana/loki/master/cmd/loki/loki-local-config.yaml) and store as `config.yaml` on the local directory | ||
* Start Loki with `$ loki-linux-amd64`, making sure the config file is on the current directory | ||
|
||
Now, we need a tool to interact with Loki. Either use Grafana and configure it with a Loki data source, or use `logcli`: | ||
|
||
* Download and unpack the `logcli` package on a local directory, like `~/bin` | ||
* You are now ready to issue queries to Loki, such as: `logcli-linux-amd64 query '{exporter="OTLP"}'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.