-
Notifications
You must be signed in to change notification settings - Fork 7
feat!: add "ctx context.Context" to all event handlers #122
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
Conversation
This can be used for tracing purposes.
@cbrgm what do you think about this ? I'm available for discussions |
Heyho, in general I like the idea adding the context as the first argument. I'm not sure whether we want to release a v2.0.0 version here already. I'd like to sneak in some other breaking changes such as changing the import path from The library is also out since quite some years at this point and I'm also sure one can write parts of the code way better nowadays using generics as well. So tldr: I like your idea, but I think we should plan ahead a little bit and release a proper v2 with some other changes as well. :) |
I also really appreciate your OTeL example here. The issue is that since the examples are not independent Go modules, the OteL dependencies will become part of this library as well which is not great. That's also a reason why we should probably update the module structure in a |
Sure i'll be glad to help, however I think that the generation is far superior to using generics here as everything is far more straightforward as a consumer. If releasing a v2 is also scary, I can try to create handlers with context, and we can deprecate the one without. Which means lib is still compatible. How can we plan this @cbrgm ? |
I like the idea of having a context in callbacks and see the benefits. We don't need to add deprecation notices everywhere and duplicate most of the functions. I'd say then let's push for a After this we can split the current Go module into several modules, one for each example + move the main |
Sounds like a plan, should we do everything in that issue ? Do you want to do it ? |
Hey @cbrgm I've bumped the version to v2 I think the What can I do to get this version released ? |
Hey, will check this on the weekend when I have some sparetime. Sorry for the slow responses. |
Merging this now. |
This can be used for tracing purposes.
This is a breaking change as every handler now have a context as a first argument.