Verified Commit 65ea4811 authored by Florian Forster's avatar Florian Forster
Browse files

fix(tracing): Fix formatting of `url.URL` attributes.

This changes switches to a type casae, which allows us to match on interfaces,
particularly the `fmt.Stringer` interface. This is also more efficient,
especially for string types.

While there, I also changed the behavior of unsupported types: instead of
adding an error message in the attribute, the code uses `fmt.Sprint` to format
the value and adds a `<key>.error` attribute with the error message instead.

Likewise, string attributes that are too long (more than 256 bytes) also get an
`.error` attribute explaining what is happening.

Issue: #78
parent 3112dee2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment