Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libbeat panic when float32 value returned in metricset #6128

Closed
iahmedov opened this issue Jan 21, 2018 · 0 comments
Closed

Libbeat panic when float32 value returned in metricset #6128

iahmedov opened this issue Jan 21, 2018 · 0 comments
Labels

Comments

@iahmedov
Copy link
Contributor

  • Version:
    libbeat 7.0.0-alpha1 [72de9ed]

  • Operating System:
    Linux

  • Steps to Reproduce:

func (m *MetricSet) Fetch() (common.MapStr, error) {
  return common.MapStr{
    "value": float32(1),
  }, nil
}

Whats happening:

panic: interface conversion: interface {} is float32, not float64

goroutine 38 [running]:
github.com/elastic/beats/libbeat/common.normalizeValue(0x26aa620, 0x3ada1a0, 0xc42025fc10, 0x3, 0xa, 0x253f9f0, 0x25353d2, 0x26e0ae0, 0x25340d3, 0x2790a40)
	/home/ixtiyor/projects/golang/src/github.com/elastic/beats/libbeat/common/event.go:156 +0x2125
github.com/elastic/beats/libbeat/common.normalizeMap(0xc420298c00, 0xc42025fc10, 0x2, 0xa, 0x0, 0x0, 0x0, 0x0)
	/home/ixtiyor/projects/golang/src/github.com/elastic/beats/libbeat/common/event.go:47 +0x1c0
github.com/elastic/beats/libbeat/common.normalizeValue(0x29d5300, 0xc420298c00, 0xc42025fc10, 0x2, 0xa, 0x26c2ae0, 0xc420152e60, 0x0, 0x0, 0x0)
	/home/ixtiyor/projects/golang/src/github.com/elastic/beats/libbeat/common/event.go:162 +0x148c
github.com/elastic/beats/libbeat/common.normalizeMap(0xc420299020, 0xc42025fc10, 0x1, 0xa, 0x0, 0x0, 0x0, 0x0)
	/home/ixtiyor/projects/golang/src/github.com/elastic/beats/libbeat/common/event.go:47 +0x1c0
github.com/elastic/beats/libbeat/common.normalizeValue(0x29d5300, 0xc420299020, 0xc42025fc10, 0x1, 0xa, 0x29d5300, 0xc420299200, 0x0, 0x0, 0x0)
	/home/ixtiyor/projects/golang/src/github.com/elastic/beats/libbeat/common/event.go:162 +0x148c
github.com/elastic/beats/libbeat/common.normalizeMap(0xc420298f90, 0xc42025fc10, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0)
	/home/ixtiyor/projects/golang/src/github.com/elastic/beats/libbeat/common/event.go:47 +0x1c0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants