Don't add unserializable fields to jolokia2 input (#4930)
This commit is contained in:
@@ -158,8 +158,11 @@ func (pb *pointBuilder) fillFields(name string, value interface{}, fieldMap map[
|
||||
if valueMap, ok := value.(map[string]interface{}); ok {
|
||||
// keep going until we get to something that is not a map
|
||||
for key, innerValue := range valueMap {
|
||||
var innerName string
|
||||
if _, ok := innerValue.([]interface{}); ok {
|
||||
continue
|
||||
}
|
||||
|
||||
var innerName string
|
||||
if name == "" {
|
||||
innerName = pb.metric.FieldPrefix + key
|
||||
} else {
|
||||
@@ -172,6 +175,10 @@ func (pb *pointBuilder) fillFields(name string, value interface{}, fieldMap map[
|
||||
return
|
||||
}
|
||||
|
||||
if _, ok := value.([]interface{}); ok {
|
||||
return
|
||||
}
|
||||
|
||||
if pb.metric.FieldName != "" {
|
||||
name = pb.metric.FieldName
|
||||
if prefix := pb.metric.FieldPrefix; prefix != "" {
|
||||
|
||||
Reference in New Issue
Block a user