hyperdx
hyperdx copied to clipboard
json struct showing empty
As you can see i am sending the struct as JSON but in Hyperdx foo shows empty
so how to send JSON data ?
// create new logger with opentelemetry zap core and set it globally
logger := zap.New(otelzap.NewOtelCore(loggerProvider))
zap.ReplaceGlobals(logger)
logger.Warn("hello world", zap.Any("foo", struct {
Bar string
Baz int
}{
Bar: "bar",
Baz: 1,
}))