Skip to content
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

feat(otel): Add OpenTelemetry middleware #901

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

dahlia
Copy link

@dahlia dahlia commented Dec 22, 2024

This middleware addresses honojs/hono#1864. For usage, see also the README file.

Comment on lines +13 to +14
const PACKAGE_NAME = '@hono/otel'
const PACKAGE_VERSION = '0.1.0'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to eliminate the duplication with the metadata in package.json, but couldn't think of a good way to do it.

@GewoonJaap
Copy link

Does this also work with cloudflare workers? After install the node-sdk of opentelemetry I am getting startup errors. Looks like that package isn't supported with cloudflare workers

@dahlia
Copy link
Author

dahlia commented Dec 25, 2024

Does this also work with cloudflare workers? After install the node-sdk of opentelemetry I am getting startup errors. Looks like that package isn't supported with cloudflare workers

I have no idea either, but @microlabs/otel-cf-workers instead of @opentelemetry/sdk-node might work with Cloudflare Workers?

@GewoonJaap
Copy link

Ah okay. Yeah I made an issue there about Hono compatibility. Looks like Hono exposes things a bit different than the default Cloudflare worker endpoint stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants