Collector "json: cannot unmarshal bool into Go value of type string"
#2751
Answered
by
michaelfig
michaelfig
asked this question in
Q&A
-
From time to time, I get the following error from
how do I diagnose what's going on?
items to be sent [
Span {
attributes: {
'message.type': 'send',
target: 'ko23',
'message.msg.method': 'inbound',
'message.msg.args.slots': '[]',
delivery: 'message',
crankNum: 94,
vatID: 'v2',
deliveryNum: 6,
replay: false,
status: 'ok',
meterType: 'xs-meter-12',
currentHeapCount: 52430,
compute: 100765,
allocate: 46268448
},
links: [],
events: [],
status: { code: 0 },
endTime: [ 1643583397, 216981411 ],
_ended: true,
_duration: [ 0, 429573298 ],
name: 'inbound',
_spanContext: {
traceId: '8bf7a462eef542e73734b8a4388c85c2',
spanId: 'ac09da331681eb64',
traceFlags: 1,
traceState: undefined
},
parentSpanId: undefined,
kind: 0,
startTime: [ 1643583396, 787408113 ],
resource: Resource { attributes: [Object] },
instrumentationLibrary: { name: 'slog-trace', version: undefined },
_spanLimits: {
attributeValueLengthLimit: Infinity,
attributeCountLimit: 128,
linkCountLimit: 128,
eventCountLimit: 128
},
_spanProcessor: MultiSpanProcessor { _spanProcessors: [Array] },
_attributeValueLengthLimit: Infinity
},
Span {
attributes: {
'message.type': 'bringOutYourDead',
vatID: 'v2',
delivery: 'bringOutYourDead',
crankNum: 95,
deliveryNum: 7,
replay: false,
status: 'ok',
meterType: 'xs-meter-12',
currentHeapCount: 37054,
compute: 5445,
allocate: 46268448
},
links: [],
events: [],
status: { code: 0 },
endTime: [ 1643583397, 815892935 ],
_ended: true,
_duration: [ 0, 598741293 ],
name: 'bringOutYourDead',
_spanContext: {
traceId: 'b3f4ef11333ef0b1099c851230438815',
spanId: 'ae86c7c84d55af84',
traceFlags: 1,
traceState: undefined
},
parentSpanId: undefined,
kind: 0,
startTime: [ 1643583397, 217151642 ],
resource: Resource { attributes: [Object] },
instrumentationLibrary: { name: 'slog-trace', version: undefined },
_spanLimits: {
attributeValueLengthLimit: Infinity,
attributeCountLimit: 128,
linkCountLimit: 128,
eventCountLimit: 128
},
_spanProcessor: MultiSpanProcessor { _spanProcessors: [Array] },
_attributeValueLengthLimit: Infinity
},
Span {
attributes: {
syscall: 'invoke',
crankNum: 96,
vatID: 'v2',
deliveryNum: 8,
syscallNum: 0,
replay: false,
target: 'kd30',
method: 'sendBroadcast',
status: 'ok'
},
links: [],
events: [],
status: { code: 2, message: false },
endTime: [ 1643583397, 923569679 ],
_ended: true,
_duration: [ 0, 1150608 ],
name: 'sendBroadcast',
_spanContext: {
traceId: '3ad94b6c16ecc0d78679b75447b8ebae',
spanId: '53c29d24514db28a',
traceFlags: 1,
traceState: undefined
},
parentSpanId: 'cb7aa3e547f3c779',
kind: 0,
startTime: [ 1643583397, 922419071 ],
resource: Resource { attributes: [Object] },
instrumentationLibrary: { name: 'slog-trace', version: undefined },
_spanLimits: {
attributeValueLengthLimit: Infinity,
attributeCountLimit: 128,
linkCountLimit: 128,
eventCountLimit: 128
},
_spanProcessor: MultiSpanProcessor { _spanProcessors: [Array] },
_attributeValueLengthLimit: Infinity
},
Span {
attributes: {
syscall: 'invoke',
crankNum: 96,
vatID: 'v2',
deliveryNum: 8,
syscallNum: 1,
replay: false,
target: 'kd30',
method: 'sendResponse',
status: 'ok'
},
links: [],
events: [],
status: { code: 2, message: false },
endTime: [ 1643583397, 926194668 ],
_ended: true,
_duration: [ 0, 481367 ],
name: 'sendResponse',
_spanContext: {
traceId: '3ad94b6c16ecc0d78679b75447b8ebae',
spanId: '624288c1c13a6fe4',
traceFlags: 1,
traceState: undefined
},
parentSpanId: 'cb7aa3e547f3c779',
kind: 0,
startTime: [ 1643583397, 925713301 ],
resource: Resource { attributes: [Object] },
instrumentationLibrary: { name: 'slog-trace', version: undefined },
_spanLimits: {
attributeValueLengthLimit: Infinity,
attributeCountLimit: 128,
linkCountLimit: 128,
eventCountLimit: 128
},
_spanProcessor: MultiSpanProcessor { _spanProcessors: [Array] },
_attributeValueLengthLimit: Infinity
},
Span {
attributes: {
'message.type': 'send',
target: 'ko23',
'message.msg.method': 'inbound',
'message.msg.args.slots': '[]',
delivery: 'message',
crankNum: 96,
vatID: 'v2',
deliveryNum: 8,
replay: false,
status: 'ok',
meterType: 'xs-meter-12',
currentHeapCount: 57305,
compute: 159380,
allocate: 46268448
},
links: [],
events: [],
status: { code: 0 },
endTime: [ 1643583397, 931235075 ],
_ended: true,
_duration: [ 0, 18856764 ],
name: 'inbound',
_spanContext: {
traceId: '3ad94b6c16ecc0d78679b75447b8ebae',
spanId: 'cb7aa3e547f3c779',
traceFlags: 1,
traceState: undefined
},
parentSpanId: undefined,
kind: 0,
startTime: [ 1643583397, 912378311 ],
resource: Resource { attributes: [Object] },
instrumentationLibrary: { name: 'slog-trace', version: undefined },
_spanLimits: {
attributeValueLengthLimit: Infinity,
attributeCountLimit: 128,
linkCountLimit: 128,
eventCountLimit: 128
},
_spanProcessor: MultiSpanProcessor { _spanProcessors: [Array] },
_attributeValueLengthLimit: Infinity
},
Span {
attributes: {
'message.type': 'bringOutYourDead',
vatID: 'v2',
delivery: 'bringOutYourDead',
crankNum: 97,
deliveryNum: 9,
replay: false,
status: 'ok',
meterType: 'xs-meter-12',
currentHeapCount: 37054,
compute: 5445,
allocate: 46268448
},
links: [],
events: [],
status: { code: 0 },
endTime: [ 1643583397, 942844391 ],
_ended: true,
_duration: [ 0, 11480093 ],
name: 'bringOutYourDead',
_spanContext: {
traceId: '3fcbc6c784b337a887b3bc79bf63d578',
spanId: '331b3b206f39bd3a',
traceFlags: 1,
traceState: undefined
},
parentSpanId: undefined,
kind: 0,
startTime: [ 1643583397, 931364298 ],
resource: Resource { attributes: [Object] },
instrumentationLibrary: { name: 'slog-trace', version: undefined },
_spanLimits: {
attributeValueLengthLimit: Infinity,
attributeCountLimit: 128,
linkCountLimit: 128,
eventCountLimit: 128
},
_spanProcessor: MultiSpanProcessor { _spanProcessors: [Array] },
_attributeValueLengthLimit: Infinity
}
]
|
Beta Was this translation helpful? Give feedback.
Answered by
michaelfig
Jan 31, 2022
Replies: 1 comment 2 replies
-
This is another thing I was able to figure out. My method was to turn on diagnostics with: import { diag, DiagConsoleLogger, DiagLogLevel } from '@opentelemetry/api';
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.VERBOSE); Then I changed my use of the span.setStatus({ code: SpanStatusCode.ERROR, message: errorMessage }); code was sending an Tracing Happiness! |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
michaelfig
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is another thing I was able to figure out. My method was to turn on diagnostics with:
Then I changed my use of the
BatchSpanProcessor
toSimpleSpanProcessor
. It narrowed down exactly what message provoked the error. I found that mycode was sending an
errorMessage
that wasfalse
. Ensuring it was only a string instead made the problem go away.Tracing Happiness!