[go: up one dir, main page]

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.

Fixes: #78 (closed)

Edited by Florian Forster

Merge request reports

Loading