I am using the pgx tracer from nrpgx5 package, the querying segment cannot be sent successfully because some of the query parameters are not primitive:
unable to end datastore segment collection=user operation=select product=Postgres reason="attribute '$1' value of type uuid.UUID is invalid"
uuid.UUID are not primitive, but it implements fmt.Stringer interface.
It would be great if we can handle fmt.Stringer for attributes.
Desired Behaviour
Attributes on a segment accept fmt.Stringer implemented types.
Summary
User attributes in segments does not support types other than primitive types. https://github.com/newrelic/go-agent/blob/0100f62956fc305066a0cffe8ac77d901e8e07da/v3/newrelic/attributes_from_internal.go#L357-L374
I am using the pgx tracer from
nrpgx5
package, the querying segment cannot be sent successfully because some of the query parameters are not primitive:uuid.UUID
are not primitive, but it implementsfmt.Stringer
interface. It would be great if we can handlefmt.Stringer
for attributes.Desired Behaviour
Attributes on a segment accept
fmt.Stringer
implemented types.Possible Solution
Add a case to the switch statement:
Additional context
N/A