Skip to content

Releases: trustwallet/go-libs

metrics: Enhance the http metrics middleware

25 Mar 15:13
f277fdb

Choose a tag to compare

This pull request includes changes to the middleware/metrics.go and middleware/metrics_test.go files to enhance the metrics middleware by adding status code tracking and updating the corresponding tests. The most important changes include adding status code labels, updating the metrics middleware to record status codes, and modifying the tests to validate the new status code metrics.

Enhancements to metrics middleware:

  • middleware/metrics.go: Added a new label labelStatus to track HTTP status codes and updated the MetricsMiddleware function to include this label in the metrics.
  • middleware/metrics.go: Modified the MetricsMiddleware function to record the status code of each request and include it in the label values.

Updates to tests:

  • middleware/metrics_test.go: Added a new route /404 to simulate a 404 error and updated the test cases to include this new route.
  • middleware/metrics_test.go: Updated the expected metrics to include new keys for client and server errors, and modified the assertions to check for the new status code label.

v0.8.8

19 Dec 08:05
7b40d46

Choose a tag to compare

add err body (#242)

v0.8.7

08 Sep 10:21
6022cf2

Choose a tag to compare

What's Changed

Full Changelog: v0.8.6...v0.8.7

v0.8.6

01 Sep 09:54
d015fcf

Choose a tag to compare

What's Changed

Full Changelog: v0.8.5...v0.8.6

v0.8.5

28 Aug 09:02
de9ae91

Choose a tag to compare

What's Changed

Full Changelog: v0.8.4...v0.8.5

v0.8.4

18 Aug 07:10
39e2813

Choose a tag to compare

What's Changed

  • Fix dependency version of logrus_mate by @iCell in #231

Full Changelog: v0.8.3...v0.8.4

Scan method in Redis wrapper

01 Aug 19:12
d8decaf

Choose a tag to compare

v0.8.3

scan method (#229)

v0.8.2

31 Jul 05:26
9c1ab9b

Choose a tag to compare

What's Changed

Full Changelog: v0.8.1...v0.8.2

v0.8.1

26 Jul 03:11
7365fe5

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.8.0...v0.8.1

v0.8.0

12 Jul 09:44
776b80f

Choose a tag to compare

What's Changed

Full Changelog: v0.7.9...v0.8.0