Skip to content

[otel] TypeError: ArrayPrototypeSplit is not a functionΒ #28537

@yasaichi

Description

@yasaichi

Version: Deno 2.2.4

I encountered the following error when trying to enable the built-in Otel instrumentation.

error: Uncaught (in promise) TypeError: ArrayPrototypeSplit is not a function
    at TraceStateClass._parse (ext:deno_telemetry/telemetry.ts:713:70)
    at new TraceStateClass (ext:deno_telemetry/telemetry.ts:687:29)
    at W3CTraceContextPropagator.extract (ext:deno_telemetry/telemetry.ts:764:32)
    at mapped (ext:deno_http/00_serve.ts:463:36)
    at ext:deno_http/00_serve.ts:651:29
    at eventLoopTick (ext:core/01_core.js:177:7)

Based on the stack trace info, this error seems to be coming from here:

ArrayPrototypeSplit(rawTraceState, LIST_MEMBERS_SEPARATOR),

As I can see, ArrayPrototypeSplit is not defined in primordials.mjs in Deno v2.2.4, which would be the root cause.

export const ArrayPrototypeFilter = (that, ...args) => that.filter(...args);
export const ArrayPrototypeForEach = (that, ...args) => that.forEach(...args);
export const ArrayPrototypeIncludes = (that, ...args) => that.includes(...args);
export const ArrayPrototypeJoin = (that, ...args) => that.join(...args);
export const ArrayPrototypePush = (that, ...args) => that.push(...args);
export const ArrayPrototypeSlice = (that, ...args) => that.slice(...args);
export const ArrayPrototypeSome = (that, ...args) => that.some(...args);
export const ArrayPrototypeSort = (that, ...args) => that.sort(...args);
export const ArrayPrototypeUnshift = (that, ...args) => that.unshift(...args);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions