-
Notifications
You must be signed in to change notification settings - Fork 36
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
[Bug]: Got Exception ,Only supported hex string lengths are 16 and 32 #833
Comments
Thank you very much for the detailed report. We will look into this right away. You can work around this issue for now by configuring For that, you could either use:
in your Instana agent configuration file, or set the environment variable You can find more documentation around this https://www.ibm.com/docs/en/instana-observability/current?topic=references-kafka-header-migration#configuration-options. |
One question: Can you confirm that this only happens when your Node.js application receives an incoming call (could be another Kafka message, an HTTP request, an RPC call, ...) from another service that is also instrumented with either an Instana tracer or another W3C trace context compatible tracer (like OpenTelemetry, Dynatrace, ...)? I can reproduce your issue for that scenario. I can't see how this would happen if your Node.js application is the one that starts the trace (that is, if it is the first service in this distributed transaction that is instrumented by a tracer). Thanks in advance. |
When an incoming trace correlation ID (trace ID or span ID) is shorter than the standard length, we now normalize it by left-padding it with "0" characters. Fixes: Only supported hex string lengths are 16 and 32, got: ... at Object.unsignedHexStringToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:111:11) at Object.unsignedHexStringsToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:124:11) at Object.renderTraceContextToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:153:18) at addLegacyTraceContextHeaderToAllMessages (node_modules/@instana/core/src/tracing/instrumentation/messaging/kafkaJs.js:452:23) fixes #833
When an incoming trace correlation ID (trace ID or span ID) is shorter than the standard length, we now normalize it by left-padding it with "0" characters. Fixes: Only supported hex string lengths are 16 and 32, got: ... at Object.unsignedHexStringToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:111:11) at Object.unsignedHexStringsToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:124:11) at Object.renderTraceContextToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:153:18) at addLegacyTraceContextHeaderToAllMessages (node_modules/@instana/core/src/tracing/instrumentation/messaging/kafkaJs.js:452:23) fixes #833
When an incoming trace correlation ID (trace ID or span ID) is shorter than the standard length, we now normalize it by left-padding it with "0" characters. Additionally, do not throw an error in tracingUtil, instead simply log an error. Fixes: Only supported hex string lengths are 16 and 32, got: ... at Object.unsignedHexStringToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:111:11) at Object.unsignedHexStringsToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:124:11) at Object.renderTraceContextToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:153:18) at addLegacyTraceContextHeaderToAllMessages (node_modules/@instana/core/src/tracing/instrumentation/messaging/kafkaJs.js:452:23) fixes #833
We are using only the instana right now. As you guess other applications communicate over kafka and instana shows the communication path on their dashboard. |
When an incoming trace correlation ID (trace ID or span ID) is shorter than the standard length, we now normalize it by left-padding it with "0" characters. Additionally, do not throw an error in tracingUtil, instead simply log an error. Fixes: Only supported hex string lengths are 16 and 32, got: ... at Object.unsignedHexStringToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:111:11) at Object.unsignedHexStringsToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:124:11) at Object.renderTraceContextToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:153:18) at addLegacyTraceContextHeaderToAllMessages (node_modules/@instana/core/src/tracing/instrumentation/messaging/kafkaJs.js:452:23) fixes #833
When an incoming trace correlation ID (trace ID or span ID) is shorter than the standard length, we now normalize it by left-padding it with "0" characters. Additionally, do not throw an error in tracingUtil, instead simply log an error. Fixes: Only supported hex string lengths are 16 and 32, got: ... at Object.unsignedHexStringToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:111:11) at Object.unsignedHexStringsToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:124:11) at Object.renderTraceContextToBuffer (node_modules/@instana/core/src/tracing/tracingUtil.js:153:18) at addLegacyTraceContextHeaderToAllMessages (node_modules/@instana/core/src/tracing/instrumentation/messaging/kafkaJs.js:452:23) fixes #833
Problem Description
We are using instana agent for our nodejs application. The agent throws exception time to time as following. The exception happening when the application try to send a message via kafka, due to exception some of the message sending operations fails. Our expectation is the instana agent should not break the application internal operations. We already tried to upgrade the latest version unfortunately we are still facing with exception.
Only supported hex string lengths are 16 and 32, got: 1521f334c97fd3d�[39m Error: Only supported hex string lengths are 16 and 32, got: 1521f334c97fd3d at Object.unsignedHexStringToBuffer (/src/node_modules/@instana/core/src/tracing/tracingUtil.js:111:11) at Object.unsignedHexStringsToBuffer (/src/node_modules/@instana/core/src/tracing/tracingUtil.js:124:11) at Object.renderTraceContextToBuffer (/src/node_modules/@instana/core/src/tracing/tracingUtil.js:153:18) at addLegacyTraceContextHeaderToAllMessages (/src/node_modules/@instana/core/src/tracing/instrumentation/messaging/kafkaJs.js:452:23) at addTraceContextHeaderToAllMessages (/src/node_modules/@instana/core/src/tracing/instrumentation/messaging/kafkaJs.js:437:7) at /src/node_modules/@instana/core/src/tracing/instrumentation/messaging/kafkaJs.js:94:7 at /src/node_modules/@instana/core/src/tracing/clsHooked/async_local_storage_context.js:161:15 at /src/node_modules/@instana/core/src/tracing/clsHooked/async_local_storage_context.js:148:32 at AsyncLocalStorage.run (node:async_hooks:338:14) at Namespace.run (/src/node_modules/@instana/core/src/tracing/clsHooked/async_local_storage_context.js:148:13)
Short, Self Contained Example
Node.js Version
v18.16.1
package.json
package-lock.json
The text was updated successfully, but these errors were encountered: