Skip to content

Commit 2472caa

Browse files
Use new FSC Prometheus Reporter #1177 (#1175)
Signed-off-by: Alexandros Filios <alexandros.filios@ibm.com>
1 parent f04e50b commit 2472caa

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/gin-gonic/gin v1.10.0
1313
github.com/gobuffalo/packr/v2 v2.7.1
1414
github.com/hashicorp/go-uuid v1.0.3
15-
github.com/hyperledger-labs/fabric-smart-client v0.5.1-0.20250717111311-f6c3bf731689
15+
github.com/hyperledger-labs/fabric-smart-client v0.5.1-0.20250727045207-0ff2d278eaca
1616
github.com/hyperledger/fabric-chaincode-go/v2 v2.3.0
1717
github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5
1818
github.com/hyperledger/fabric-protos-go-apiv2 v0.3.7

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,8 +1057,8 @@ github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc=
10571057
github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
10581058
github.com/hyperledger-labs/SmartBFT v0.0.0-20250503203013-eb005eef8866 h1:Mu/6NJsfl9g3wM15Ue7hqPq4LtgYDoABh8MO4u8aW4g=
10591059
github.com/hyperledger-labs/SmartBFT v0.0.0-20250503203013-eb005eef8866/go.mod h1:9aNHNXsCVy/leGz2gpTC1eOL5QecxbSAGjqsLh4T1LM=
1060-
github.com/hyperledger-labs/fabric-smart-client v0.5.1-0.20250717111311-f6c3bf731689 h1:yR1Fv/9fVNtHNMfGO/9HDDd0Rx4LTQzUCDZsWwgVwwo=
1061-
github.com/hyperledger-labs/fabric-smart-client v0.5.1-0.20250717111311-f6c3bf731689/go.mod h1:34dRgLomeTQYI7fffCYDTiSQSRo9LBsPuq0aWBU5EOA=
1060+
github.com/hyperledger-labs/fabric-smart-client v0.5.1-0.20250727045207-0ff2d278eaca h1:dlGq8PDSRAiO6BcOzRiplh8UUyxwiitpCeNysUNUd/Y=
1061+
github.com/hyperledger-labs/fabric-smart-client v0.5.1-0.20250727045207-0ff2d278eaca/go.mod h1:34dRgLomeTQYI7fffCYDTiSQSRo9LBsPuq0aWBU5EOA=
10621062
github.com/hyperledger/aries-bbs-go v0.0.0-20240528084656-761671ea73bc h1:3Ykk6MtyfnlzMOQry9zkxsoLWpCWZwDPqehO/BJwArM=
10631063
github.com/hyperledger/aries-bbs-go v0.0.0-20240528084656-761671ea73bc/go.mod h1:Kofn6A6WWea1ZM8Rys5aBW9dszwJ7Ywa0kyyYL0TPYw=
10641064
github.com/hyperledger/fabric v1.4.0-rc1.0.20250510200036-435a7f1a780a h1:l9dE3iuE+mKj7K8Tcx904cF8zJpaNQONh3GNZdXnnyc=

integration/token/fungible/support.go

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,21 +1354,14 @@ func CheckLocalMetrics(ii *integration.Infrastructure, user string, viewName str
13541354
}
13551355

13561356
func CheckPrometheusMetrics(ii *integration.Infrastructure, viewName string) {
1357-
cli, err := ii.NWO.PrometheusAPI()
1357+
cli, err := ii.NWO.PrometheusReporter()
13581358
gomega.Expect(err).ToNot(gomega.HaveOccurred())
1359-
metric := model.Metric{
1360-
"__name__": model.LabelValue("fsc_view_operations"),
1359+
1360+
vector, err := cli.GetVector(model.Metric{
1361+
"__name__": "fsc_view_operations",
13611362
"view": model.LabelValue(viewName),
1362-
}
1363-
val, warnings, err := cli.Query(context.Background(), metric.String(), time.Now())
1364-
gomega.Expect(warnings).To(gomega.BeEmpty())
1363+
})
13651364
gomega.Expect(err).ToNot(gomega.HaveOccurred())
1366-
gomega.Expect(val.Type()).To(gomega.Equal(model.ValVector))
1367-
1368-
logger.Infof("Received prometheus metrics for view [%s]: %s", viewName, val)
1369-
1370-
vector, ok := val.(model.Vector)
1371-
gomega.Expect(ok).To(gomega.BeTrue())
13721365
gomega.Expect(vector).NotTo(gomega.BeEmpty())
13731366
for _, v := range vector {
13741367
gomega.Expect(v.Value).NotTo(gomega.Equal(model.SampleValue(0)))

0 commit comments

Comments
 (0)