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

Adding to context via middleware #410

Closed
RichiCoder1 opened this issue Jul 19, 2022 · 2 comments
Closed

Adding to context via middleware #410

RichiCoder1 opened this issue Jul 19, 2022 · 2 comments

Comments

@RichiCoder1
Copy link

Howdy! I'd like to add support to hono for https://github.com/RichiCoder1/opentelemetry-sdk-workers. As part of that, I'd like to make some context variables available like log and trace.

It looks like the current shape of hono is fixed so I'd have to make a new type. Is there plans to allow middleware to extend context in the future?

@yusukebe
Copy link
Member

Hi @RichiCoder1 !

That's very good to make the middleware for "Open Telemetry". We are planning that other developers can make third-party middleware in "honojs org" in such a "github.com/honojs/open-telemetry" and provide named "@honojs/open-telemetry" from npm repository. #407 If you want please do that.

Is there plans to allow middleware to extend context in the future?

I was just thinking about that one! But, I don't have a good idea to implement it. We'll think about it in another issue (If you want, please join the discussion!).

That feature may be implemented, so wait until then!

@yusukebe
Copy link
Member

Discussing at #414, close this Issue.

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

No branches or pull requests

2 participants