You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Structured logging in go can use the nrslog.Duration type to define an attribute. However, that does not get reported as a duration, but instead gets reported as the string time.Duration
Description
Structured logging in go can use the nrslog.Duration type to define an attribute. However, that does not get reported as a duration, but instead gets reported as the string
time.Duration
Steps to Reproduce
The following code sample is based from the example in https://github.com/newrelic/go-agent/blob/master/v3/integrations/logcontext-v2/nrslog/example/main.go and adds a
slog.Duration
attribute when logging.Expected Behavior
An actual duration (as integer, or float based on the unit) would be populated instead of the string.
Your Environment
Go: 1.24
Go-Agent: v3.38.0
Reproduction case
Additional context
Note:
time.Time
has similar issues in that it comes as a string timestamp which NR would then have to parse.The text was updated successfully, but these errors were encountered: