Skip to content

Releases: trustwallet/go-libs

metrics: Enhance the http metrics middleware

Choose a tag to compare

@dmytrorezn dmytrorezn released this 25 Mar 15:13
f277fdb

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

Choose a tag to compare

@defisaur defisaur released this 19 Dec 08:05
7b40d46
add err body (#242)

v0.8.7

Choose a tag to compare

@DeimonDB DeimonDB released this 08 Sep 10:21
6022cf2

What's Changed

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

v0.8.6

Choose a tag to compare

@DeimonDB DeimonDB released this 01 Sep 09:54
d015fcf

What's Changed

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

v0.8.5

Choose a tag to compare

@DeimonDB DeimonDB released this 28 Aug 09:02
de9ae91

What's Changed

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

v0.8.4

Choose a tag to compare

@iCell iCell released this 18 Aug 07:10
39e2813

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

Choose a tag to compare

@defisaur defisaur released this 01 Aug 19:12
d8decaf
v0.8.3

scan method (#229)

v0.8.2

Choose a tag to compare

@iCell iCell released this 31 Jul 05:26
9c1ab9b

What's Changed

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

v0.8.1

Choose a tag to compare

@DeimonDB DeimonDB released this 26 Jul 03:11
7365fe5

What's Changed

New Contributors

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

v0.8.0

Choose a tag to compare

@DeimonDB DeimonDB released this 12 Jul 09:44
776b80f

What's Changed

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