Skip to content

Uncaught Error: Only valueType: DOUBLE is supported in Deno when using httpInstrumentationMiddleware #1561

@PaterAnderson

Description

@PaterAnderson

Which middleware has the bug?

@hono/otel

What version of the middleware?

1.0.1

What version of Hono are you using?

4.9.1

What runtime/platform is your app running on? (with version if possible)

deno 2.5.4

What steps can reproduce the bug?

When using @hono/otel with httpInstrumentationMiddleware in Deno:

  1. Create a Deno project with Hono and @hono/otel installed.
  2. Import and initialize httpInstrumentationMiddleware in your API.
  3. Start the API with deno run -A main.ts.
  4. Any request triggers the error.

What is the expected behavior?

Expected behavior:

  • The middleware should work in Deno without throwing the error.
  • HTTP traces should be created correctly.
  • Active request metrics should work or be disabled properly when configured.

What do you see instead?

On every incoming request, Deno throws:

Uncaught (in promise) Error: Only valueType: DOUBLE is supported at Meter.createUpDownCounter at createActiveRequestsTracker at httpInstrumentationMiddleware

This happens even if enableActiveRequests: false is passed, suggesting that the code path is still executed.

Additional information

Because of this mismatch, any attempt to create an UpDownCounter crashes the middleware. So even though traces work fine in Deno, the middleware cannot initialize due to unsupported metric instruments.

Confirmed workarounds (but not ideal):

  • Disable middleware entirely.
  • Avoid using httpInstrumentationMiddleware and implement custom tracing.
  • Modify the library locally to use createObservableGauge instead of createUpDownCounter.

But we would prefer a fix in the library itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions