DenoDDeno
Powered by
BretB
Denoβ€’2mo agoβ€’
1 reply
Bret

Can't use OpenTelemetry at all

βš™οΈDeno CLIπŸ› οΈStandard LibraryπŸ§‘β€πŸ’»JS / TS DevelopmentDeno.* APIs
I've tried many methods, but I still can't get logging to work properly.


My console output is normal; OpenTelemetry shows no data.

I try in linux and mac

Run Command:
OTEL_DENO=true deno run --unstable-otel -A main.ts
OTEL_DENO=true deno run --unstable-otel -A main.ts


Code:
import { Hono } from 'hono'

const app = new Hono()

app.get('/', (c) => {
  console.log("Test")
  
  
  return c.text('Hello Hono')
})

app.get('/internal-health-check', (c) => c.text('ok'))

Deno.serve(app.fetch)
import { Hono } from 'hono'

const app = new Hono()

app.get('/', (c) => {
  console.log("Test")
  
  
  return c.text('Hello Hono')
})

app.get('/internal-health-check', (c) => c.text('ok'))

Deno.serve(app.fetch)


Console Log:
Listening on http://0.0.0.0:8000/ (http://localhost:8000/)
Test
Listening on http://0.0.0.0:8000/ (http://localhost:8000/)
Test


Deno: v2.6.8

Hono: v4.11.7

And I tested the regular Deno.serve, and it still didn't work.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

OpenTelemetry instrumentation
bagerenBbageren / help
2y ago
how can I enable Deno vscode all inlay hints at once?
divyDdivy / help
4y ago
OpenTelemetry Setup with Axiom.co
ashutoshAashutosh / help
11mo ago