Skip to content

Commit 2ffe949

Browse files
authored
add Prometheus query client, move Loki client, expose base obs URLs (#1994)
add Prometheus query client, move Loki client to framework, expose base obs URLs
1 parent b34ccb3 commit 2ffe949

File tree

14 files changed

+1018
-30
lines changed

14 files changed

+1018
-30
lines changed

.github/workflows/test.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ jobs:
1515
test:
1616
- path: framework
1717
vm: ubuntu-latest
18-
regex: TestStorageMutations
18+
regex: TestSmoke
1919
- path: framework
2020
vm: ubuntu-latest
21-
regex: TestSmoke
21+
regex: TestPrometheus
22+
- path: framework
23+
vm: ubuntu-latest
24+
regex: TestLoki
25+
- path: framework
26+
vm: ubuntu-latest
27+
regex: TestStorageMutations
2228
- path: wasp
2329
vm: ubuntu22.04-16cores-64GB # ghv-ignore!
2430
regex: TestSmoke

framework/.changeset/v0.10.8.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Move Loki client to framework
2+
- Add Prometheus Query/QueryRange client
3+
- Expose base obs URLs as constants

framework/components/dockercompose/go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ require (
8484
github.com/go-playground/locales v0.14.1 // indirect
8585
github.com/go-playground/universal-translator v0.18.1 // indirect
8686
github.com/go-playground/validator/v10 v10.22.1 // indirect
87+
github.com/go-resty/resty/v2 v2.15.3 // indirect
8788
github.com/go-viper/mapstructure/v2 v2.0.0 // indirect
8889
github.com/gofrs/flock v0.12.1 // indirect
8990
github.com/gogo/protobuf v1.3.2 // indirect

framework/components/dockercompose/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
238238
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
239239
github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA=
240240
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
241+
github.com/go-resty/resty/v2 v2.15.3 h1:bqff+hcqAflpiF591hhJzNdkRsFhlB96CYfBwSFvql8=
242+
github.com/go-resty/resty/v2 v2.15.3/go.mod h1:0fHAoK7JoBy/Ch36N8VFeMsK7xQOHhvWaC3iOktwmIU=
241243
github.com/go-sql-driver/mysql v1.3.0 h1:pgwjLi/dvffoP9aabwkT3AKpXQM93QARkjFhDDqC1UE=
242244
github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
243245
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=

framework/examples/myproject/chaos/chaos_k8s_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"time"
99

1010
f "github.com/smartcontractkit/chainlink-testing-framework/framework"
11-
gf "github.com/smartcontractkit/chainlink-testing-framework/framework/grafana"
1211
"github.com/smartcontractkit/chainlink-testing-framework/framework/rpc"
1312
"github.com/smartcontractkit/chainlink-testing-framework/havoc"
1413

@@ -40,7 +39,7 @@ func TestK8sChaos(t *testing.T) {
4039
c, err := havoc.NewChaosMeshClient()
4140
require.NoError(t, err)
4241
cr := havoc.NewNamespaceRunner(f.L, c, true)
43-
gc := gf.NewGrafanaClient(os.Getenv("GRAFANA_URL"), os.Getenv("GRAFANA_TOKEN"))
42+
gc := f.NewGrafanaClient(os.Getenv("GRAFANA_URL"), os.Getenv("GRAFANA_TOKEN"))
4443
rpc0 := rpc.New(cfg.BlockchainHTTPURLs[0], nil)
4544
rpc1 := rpc.New(cfg.BlockchainHTTPURLs[1], nil)
4645

@@ -471,7 +470,7 @@ func TestK8sChaos(t *testing.T) {
471470
n := time.Now()
472471
testCase.run(t)
473472
time.Sleep(f.MustParseDuration(cfg.ExperimentDuration))
474-
_, _, err := gc.Annotate(gf.A(cfg.Namespace, testCase.name, cfg.DashboardUUIDs, havoc.Ptr(n), havoc.Ptr(time.Now())))
473+
_, _, err := gc.Annotate(f.A(cfg.Namespace, testCase.name, cfg.DashboardUUIDs, havoc.Ptr(n), havoc.Ptr(time.Now())))
475474
require.NoError(t, err)
476475
testCase.validate(t)
477476
})

framework/examples/myproject/fakes/go.mod

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ module github.com/smartcontractkit/chainlink-testing-framework/framework/example
22

33
go 1.24.4
44

5-
replace github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake => ../../../components/fake
6-
75
require (
86
github.com/gin-gonic/gin v1.10.1
97
github.com/rs/zerolog v1.33.0
10-
github.com/smartcontractkit/chainlink-testing-framework/framework v0.9.9
8+
github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake v0.10.0
119
)
1210

1311
require (
@@ -33,12 +31,14 @@ require (
3331
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
3432
github.com/cloudwego/base64x v0.1.4 // indirect
3533
github.com/cloudwego/iasm v0.2.0 // indirect
34+
github.com/containerd/errdefs v1.0.0 // indirect
35+
github.com/containerd/errdefs/pkg v0.3.0 // indirect
3636
github.com/containerd/log v0.1.0 // indirect
3737
github.com/containerd/platforms v1.0.0-rc.1 // indirect
3838
github.com/cpuguy83/dockercfg v0.3.2 // indirect
3939
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
4040
github.com/distribution/reference v0.6.0 // indirect
41-
github.com/docker/docker v28.0.4+incompatible // indirect
41+
github.com/docker/docker v28.3.1+incompatible // indirect
4242
github.com/docker/go-connections v0.5.0 // indirect
4343
github.com/docker/go-units v0.5.0 // indirect
4444
github.com/ebitengine/purego v0.8.2 // indirect
@@ -54,18 +54,20 @@ require (
5454
github.com/goccy/go-json v0.10.3 // indirect
5555
github.com/gogo/protobuf v1.3.2 // indirect
5656
github.com/google/uuid v1.6.0 // indirect
57+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
5758
github.com/json-iterator/go v1.1.12 // indirect
58-
github.com/klauspost/compress v1.17.11 // indirect
59+
github.com/klauspost/compress v1.18.0 // indirect
5960
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
6061
github.com/leodido/go-urn v1.4.0 // indirect
6162
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
6263
github.com/magiconair/properties v1.8.10 // indirect
6364
github.com/mattn/go-colorable v0.1.13 // indirect
6465
github.com/mattn/go-isatty v0.0.20 // indirect
6566
github.com/moby/docker-image-spec v1.3.1 // indirect
67+
github.com/moby/go-archive v0.1.0 // indirect
6668
github.com/moby/patternmatcher v0.6.0 // indirect
6769
github.com/moby/sys/sequential v0.6.0 // indirect
68-
github.com/moby/sys/user v0.3.0 // indirect
70+
github.com/moby/sys/user v0.4.0 // indirect
6971
github.com/moby/sys/userns v0.1.0 // indirect
7072
github.com/moby/term v0.5.2 // indirect
7173
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
@@ -79,6 +81,7 @@ require (
7981
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
8082
github.com/shirou/gopsutil/v4 v4.25.1 // indirect
8183
github.com/sirupsen/logrus v1.9.3 // indirect
84+
github.com/smartcontractkit/chainlink-testing-framework/framework v0.10.0 // indirect
8285
github.com/stretchr/testify v1.10.0 // indirect
8386
github.com/testcontainers/testcontainers-go v0.37.0 // indirect
8487
github.com/tklauser/go-sysconf v0.3.12 // indirect
@@ -89,17 +92,16 @@ require (
8992
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
9093
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect
9194
go.opentelemetry.io/otel v1.37.0 // indirect
92-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect
9395
go.opentelemetry.io/otel/metric v1.37.0 // indirect
94-
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
9596
go.opentelemetry.io/otel/trace v1.37.0 // indirect
96-
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
9797
golang.org/x/arch v0.11.0 // indirect
9898
golang.org/x/crypto v0.38.0 // indirect
9999
golang.org/x/net v0.40.0 // indirect
100100
golang.org/x/sync v0.14.0 // indirect
101101
golang.org/x/sys v0.33.0 // indirect
102102
golang.org/x/text v0.25.0 // indirect
103+
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect
104+
google.golang.org/grpc v1.72.2 // indirect
103105
google.golang.org/protobuf v1.36.6 // indirect
104106
gopkg.in/yaml.v3 v3.0.1 // indirect
105107
)

framework/examples/myproject/fakes/go.sum

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/
4545
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
4646
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
4747
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
48+
github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
49+
github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
50+
github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=
51+
github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk=
4852
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
4953
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
5054
github.com/containerd/platforms v1.0.0-rc.1 h1:83KIq4yy1erSRgOVHNk1HYdPvzdJ5CnsWaRoJX4C41E=
@@ -60,8 +64,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
6064
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
6165
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
6266
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
63-
github.com/docker/docker v28.0.4+incompatible h1:JNNkBctYKurkw6FrHfKqY0nKIDf5nrbxjVBtS+cdcok=
64-
github.com/docker/docker v28.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
67+
github.com/docker/docker v28.3.1+incompatible h1:20+BmuA9FXlCX4ByQ0vYJcUEnOmRM6XljDnFWR+jCyY=
68+
github.com/docker/docker v28.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
6569
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
6670
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
6771
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
@@ -92,8 +96,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
9296
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
9397
github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA=
9498
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
95-
github.com/go-resty/resty/v2 v2.15.3 h1:bqff+hcqAflpiF591hhJzNdkRsFhlB96CYfBwSFvql8=
96-
github.com/go-resty/resty/v2 v2.15.3/go.mod h1:0fHAoK7JoBy/Ch36N8VFeMsK7xQOHhvWaC3iOktwmIU=
99+
github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM=
100+
github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
97101
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
98102
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
99103
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
@@ -111,8 +115,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
111115
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
112116
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
113117
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
114-
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
115-
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
118+
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
119+
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
116120
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
117121
github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM=
118122
github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
@@ -135,12 +139,16 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
135139
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
136140
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
137141
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
142+
github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ=
143+
github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo=
138144
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
139145
github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
146+
github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw=
147+
github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs=
140148
github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU=
141149
github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko=
142-
github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo=
143-
github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=
150+
github.com/moby/sys/user v0.4.0 h1:jhcMKit7SA80hivmFJcbB1vqmw//wU61Zdui2eQXuMs=
151+
github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs=
144152
github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g=
145153
github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
146154
github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=
@@ -174,8 +182,10 @@ github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0Zqm
174182
github.com/shirou/gopsutil/v4 v4.25.1/go.mod h1:RoUCUpndaJFtT+2zsZzzmhvbfGoDCJ7nFXKJf8GqJbI=
175183
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
176184
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
177-
github.com/smartcontractkit/chainlink-testing-framework/framework v0.9.9 h1:2uAiuZKoMhOJvExhefo8xKTIVNguWUAaHGiM4dxpZrw=
178-
github.com/smartcontractkit/chainlink-testing-framework/framework v0.9.9/go.mod h1:q99H9vcMJDs6T+zsSI8XJZd6PUkZnyG3iaRbrYNUCTk=
185+
github.com/smartcontractkit/chainlink-testing-framework/framework v0.10.0 h1:fM0jwOK1dzBzGbu7vO+yJBKKiJ3iA8mUrkAbtCEvBiE=
186+
github.com/smartcontractkit/chainlink-testing-framework/framework v0.10.0/go.mod h1:WUyLCltZaptCll89fL9vcouz5PkpfqlxlpU+mu481lA=
187+
github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake v0.10.0 h1:PWAMYu0WaAMBfbpxCpFJGRIDHmcgmYin6a+UQC0OdtY=
188+
github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake v0.10.0/go.mod h1:YEQbZRHFojvlQKeuckG/70t0WkAqOBmArSbkacgHSbc=
179189
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
180190
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
181191
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
@@ -274,8 +284,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
274284
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
275285
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1:SGktgSolFCo75dnHJF2yMvnns6jCmHFJ0vE4Vn2JKvQ=
276286
google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw=
277-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE=
278-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
287+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE=
288+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
279289
google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8=
280290
google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
281291
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=

framework/grafana/grafana.go renamed to framework/grafana.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import (
77
"github.com/go-resty/resty/v2"
88
)
99

10-
type Client struct {
10+
type GrafanaClient struct {
1111
resty *resty.Client
1212
}
1313

1414
// NewGrafanaClient initializes a new Grafana client with the specified URL and API key.
15-
func NewGrafanaClient(url, bearerToken string) *Client {
16-
return &Client{
15+
func NewGrafanaClient(url, bearerToken string) *GrafanaClient {
16+
return &GrafanaClient{
1717
resty: resty.New().
1818
SetBaseURL(url).
1919
SetHeader("Authorization", "Bearer "+bearerToken),
@@ -49,7 +49,7 @@ func A(ns, text string, dashboardUIDs []string, from, to *time.Time) Annotation
4949
}
5050

5151
// Annotate adds annotation to all the dashboards, works for both single point annotation with just StartTime and for ranges with StartTime/EndTime
52-
func (c *Client) Annotate(annotation Annotation) ([]PostAnnotationResponse, []*resty.Response, error) {
52+
func (c *GrafanaClient) Annotate(annotation Annotation) ([]PostAnnotationResponse, []*resty.Response, error) {
5353
var results []PostAnnotationResponse
5454
var responses []*resty.Response
5555

File renamed without changes.

0 commit comments

Comments
 (0)