-
Notifications
You must be signed in to change notification settings - Fork 47
WASP backend for VictoriaLogs (backward compatible) + dashboard #2618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1429412
wip
skudasov a861c10
simplify, run tests for both stacks, simplify docs
skudasov 1e04d1e
rm grabana
skudasov 5086509
gomods
skudasov 5a08bf2
fix lint
skudasov f84a3da
review part 1
skudasov f792f7c
Potential fix for pull request finding
skudasov 0554c58
Potential fix for pull request finding
skudasov 64ae1a9
debug metrics
skudasov a019ed0
stats range
skudasov b88259d
unify
skudasov 89b2d9e
simplify
skudasov 2d3017f
review fix
skudasov 0ade6a8
review fix
skudasov 3b76ab3
changeset
skudasov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
75 changes: 13 additions & 62 deletions
75
book/src/libs/wasp/how-to/start_local_observability_stack.md
This file contains hidden or 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 |
|---|---|---|
| @@ -1,77 +1,28 @@ | ||
| # WASP - How to Start Local Observability Stack | ||
|
|
||
| To execute all examples or tests locally, you need to configure a local observability stack. This stack includes **Loki**, **Grafana**, and **Pyroscope**. | ||
| To execute all examples or tests locally, you need to configure a local observability stack. | ||
|
|
||
| --- | ||
| We have 2 versions of popular stacks: LGTM (Grafana, Loki, Prometheus) and VictoriaMetrics + OTEL (Grafana, VictoriaMetrics, VictoriaLogs, OTEL). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Ensure you have the following installed: | ||
| * [Docker](https://docs.docker.com/get-docker/) | ||
|
|
||
| --- | ||
|
|
||
| ## Grafana and Loki | ||
|
|
||
| To start the local observability stack, run the following command: | ||
| ## LGTM | ||
|
|
||
| ```bash | ||
| make start | ||
| just lgtm-up # from "wasp" directory | ||
| cd examples/profiles && WASP_LOG_SEND_METHOD=loki go test -v -run TestNodeMixed && cd - | ||
| just lgtm-down | ||
| ``` | ||
|
|
||
| This command will download and run Docker images for Loki and Grafana. Once completed, it will output something like: | ||
|
|
||
| ```bash | ||
| Service account id: 2 | ||
| Grafana token: "<grafana token>" | ||
| ``` | ||
| * [Dashboard](http://localhost:3000/d/wasp-loki/wasp-loki?orgId=1&from=now-5m&to=now&timezone=browser&var-go_test_name=$__all&var-gen_name=$__all&var-branch=$__all&var-commit=$__all&var-call_group=$__all&refresh=5s) | ||
|
|
||
| ### Setting Up Environment Variables | ||
| Don't forget to remove the stack when you are done! | ||
|
|
||
| Next, set up the required environment variables. | ||
| > [!WARNING] | ||
| > Replace `<Grafana token>` with the token provided in the previous step. | ||
| ## VictoriaMetrics + OTEL | ||
|
|
||
| ```bash | ||
| export LOKI_TOKEN= | ||
| export LOKI_URL=http://localhost:3030/loki/api/v1/push | ||
| export GRAFANA_URL=http://localhost:3000 | ||
| export GRAFANA_TOKEN=<Grafana token> | ||
| export DATA_SOURCE_NAME=Loki | ||
| export DASHBOARD_FOLDER=LoadTests | ||
| export DASHBOARD_NAME=Wasp | ||
| just victoria-up # from "wasp" directory | ||
| cd examples/profiles && WASP_LOG_SEND_METHOD=otel go test -v -run TestNodeMixed && cd - | ||
| just victoria-down | ||
| ``` | ||
|
skudasov marked this conversation as resolved.
|
||
|
|
||
| ### Accessing Services | ||
|
|
||
| * Grafana: [http://localhost:3000/](http://localhost:3000/) | ||
| * Loki: [http://localhost:3030/](http://localhost:3030/) | ||
|
|
||
| ### Stopping the Containers | ||
|
|
||
| To stop both containers, run: | ||
|
|
||
| ```bash | ||
| make stop | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Pyroscope | ||
|
|
||
| To start Pyroscope, execute: | ||
|
|
||
| ```bash | ||
| make pyro_start | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > Pyroscope is available at: [http://localhost:4040/](http://localhost:4040/) | ||
|
|
||
| ### Stopping Pyroscope | ||
|
|
||
| To stop Pyroscope, run: | ||
|
|
||
| ```bash | ||
| make pyro_stop | ||
| ``` | ||
| * [Dashboard](http://localhost:3000/d/wasp-victorialogs/wasp-victorialogs?orgId=1&from=now-5m&to=now&timezone=browser&var-go_test_name=$__all&var-gen_name=$__all&var-call_group=$__all&var-branch=$__all&var-commit=$__all&refresh=5s) | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.