Meteor._debug does not receive MethodInvocation (or PublicationInvocation) #11677
Replies: 2 comments 1 reply
-
@KoenLav I have converted this to a feature request as this is a request to extend functionality. This kinds of conflicts/synergizes with the plans for the logging package which should allow to easily send all you want to error logging service. |
Beta Was this translation helpful? Give feedback.
-
You could try something as I did here: https://github.com/pathable/meteor-fast-methods/blob/master/lib/context.js#L19 You add this DDPInvocation context in a Meteor EnvironmentVariable and then call with WithValue. It's possible to create a wrapper on Meteor._debug that wraps it in this call and passes the DDPInvocation it was called into in the context of the fiber. https://github.com/pathable/meteor-fast-methods/blob/master/server.js#L25 But, as a feature request, we could also embed this feature in the log package. |
Beta Was this translation helpful? Give feedback.
-
We are overwriting Meteor._debug because (AFAIK) it's the only way to get all Errors to an error logging service.
We would like to include the user context on the server as well, but this appears impossible because Meteor._debug is called without the MethodInvocation or PublicationInvocation.
Adding this would allow all Meteor users to have more specific error logging, but I'm also open to other suggestions!
Beta Was this translation helpful? Give feedback.
All reactions