Skip to content

Releases: wrapp/instrumentation

Updated packages and go 1.19

22 Sep 13:16
9d2eae7
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.2.10...v0.3.0

Adding fail handler for validation errors

19 Mar 08:35
295afec
Compare
Choose a tag to compare

Adding a new client manager method (client.HasValidationErrors) for checking for validation messages in a http response.

Usage Example:

resp, err := c.httpClient.Post(ctx, url, client.Body(requestPayload),
   	client.FailOn(client.HasValidationErrors(errors.OfferCreationError)),
   	client.FailOn(client.StatusIsNot(errors.OfferCreationError, http.StatusCreated, http.StatusBadRequest)))
   if err != nil {
   	return "", err
   }

The message of the error given to the handler will be returned as the main error message.
If the handler finds validation errors, the error returned is a ValidationErrors with the following structure:

struct {
   Message string       `json:"message"`
   Valid   bool         `json:"valid"`
   Errors  []FieldError `json:"errors"`
}

and the FieldError struct:

struct {
	Context  string `json:"context"`
	Field    string `json:"field"`
	Expected string `json:"expected"`
	Given    string `json:"given"`
}

v0.2.9: Adding X-Amzn-Trace-Id

24 Sep 07:31
535cd9e
Compare
Choose a tag to compare
REWARDS-1940: Adding X-Amzn-Trace-Id Header to middlewares, clients a…

…nd logs (#21)

* adding new awstraceid helper

* defualt to use aws-trace-id forwarding

* add default print of aws-trace-id

* change var-comment

v0.2.9-experimental: Adding X-Amzn-Trace-Id

23 Sep 10:19
Compare
Choose a tag to compare
change var-comment

v0.2.8: Address memory leak on failed FailManagers

22 Sep 14:40
d38e2a1
Compare
Choose a tag to compare
add body.Close() on check (#19)

* add body.Close() on check

* read body before closing

v0.2.7: Merge pull request #20 from wrapp/session-id

01 Sep 07:08
80c7c97
Compare
Choose a tag to compare

Adding a sessionid that extracts the session id from the request and injects it in the context.

v0.2.6: Merge pull request #18 from wrapp/logs-shortcut

22 Jul 09:55
b4ac982
Compare
Choose a tag to compare
  • Introducing Info(ctx), Warn(ctx), Error(ctx), Panic(ctx) methods in the logs package (PR#18)
  • Introducing the Span(ctx) methods in the tracing package (PR#17)

v0.2.5: Merge pull request #16 from wrapp/status-is-not

04 May 07:53
03f6cdc
Compare
Choose a tag to compare

v0.2.4: Merge pull request #15 from wrapp/status-between

04 May 07:01
1719982
Compare
Choose a tag to compare

Pin aws-sdk version to not slow version

23 Apr 09:22
1e1a82d
Compare
Choose a tag to compare
Merge pull request #14 from wrapp/pin-aws-sdk

pin aws sdk version to eariler