Skip to content

Commit dc75805

Browse files
authored
allow caching for Anvil, allow loading local dashboards for Grafana (#1983)
* allow caching for anvil, update dashboard * allow to load local dashboards
1 parent 4993f54 commit dc75805

File tree

6 files changed

+12
-1024
lines changed

6 files changed

+12
-1024
lines changed

book/src/framework/observability/observability_stack.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ Change compose files under `framework/cmd/observability` and restart the stack (
2121
just reload-cli && ctf obs r
2222
```
2323

24+
## Local Dashboards (Docker)
25+
26+
You can create a dashboard using [UI](http://localhost:3000) and put them under `$pwd/dashboards` folder then commit, they'll be loaded automatically on start and you can find them [here](http://localhost:3000/dashboards) under `local` directory.
27+
28+
`$pwd` is you current working directory from which you call `ctf obs u`
29+
2430
## Troubleshooting
2531

2632
### `cadvisor` is not working

framework/.changeset/v0.10.6.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Allow config overrides (caching) for Anvil network
2+
- Load local Grafana dashboards

framework/components/blockchain/anvil.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ func defaultAnvil(in *Input) {
3333

3434
// newAnvil deploy foundry anvil node
3535
func newAnvil(in *Input) (*Output, error) {
36+
if in.Out != nil && in.Out.UseCache {
37+
return in.Out, nil
38+
}
3639
defaultAnvil(in)
3740
req := baseRequest(in, WithoutWsEndpoint)
3841

framework/observability.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
var EmbeddedObservabilityFiles embed.FS
1414

1515
const (
16-
LocalDFSoak = "http://localhost:3000/d/f8a04cef-653f-46d3-86df-87c532300672/df-soak?orgId=1&from=now-5m&to=now&refresh=5s"
1716
LocalCLNodeErrorsURL = "http://localhost:3000/d/a7de535b-3e0f-4066-bed7-d505b6ec9ef1/cl-node-errors?orgId=1&refresh=5s"
1817
LocalWorkflowEngineURL = "http://localhost:3000/d/ce589a98-b4be-4f80-bed1-bc62f3e4414a/workflow-engine?orgId=1&refresh=5s&from=now-15m&to=now"
1918
LocalLogsURL = "http://localhost:3000/explore?panes=%7B%22qZw%22:%7B%22datasource%22:%22P8E80F9AEF21F6940%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bjob%3D%5C%22ctf%5C%22%7D%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22P8E80F9AEF21F6940%22%7D,%22editorMode%22:%22code%22%7D%5D,%22range%22:%7B%22from%22:%22now-15m%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1"
@@ -136,7 +135,6 @@ func ObservabilityUp() error {
136135
L.Info().Msgf("Pyroscope: %s", LocalPyroScopeURL)
137136
L.Info().Msgf("CL Node Errors: %s", LocalCLNodeErrorsURL)
138137
L.Info().Msgf("Workflow Engine: %s", LocalWorkflowEngineURL)
139-
L.Info().Msgf("DF Soak: %s", LocalDFSoak)
140138
return nil
141139
}
142140

0 commit comments

Comments
 (0)