hyperdx icon indicating copy to clipboard operation
hyperdx copied to clipboard

json struct showing empty

Open khanakia opened this issue 5 months ago • 0 comments

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,
}))
Image

khanakia avatar Aug 12 '25 07:08 khanakia