-
Notifications
You must be signed in to change notification settings - Fork 893
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
Add EventName parameter to Logger.Enabled #4220
Comments
Notes from 2023-09-20 Events/Logs SIG meeting: @lmolkova, pointed out that if we would like to filter by event name then we would need to store a map (set) of disabled (or enabled) event names which can be inefficient (memory overhead). @MSNev, had a remark that it is better to filter out events by severity rather than by name. @pellared, said that on top of that each Logger can have its own severity threshold so each instrumentation library can have a distinct severity level. @cijothomas, agreed that probably it is indeed better to keep the parameters small and just accept context and severity. I am planning to discuss it during the next Specification SIG meeting. If there will be no objections then I plan to close this issue. We can reopen it in future if needed. |
Spec SIG meeting notes: |
I am against this proposal as I do not think that handling The SDK's Enabled implementation would get the context, severity level, instrumentation scope that should be enough. Side note: I think that instrumentation libraries emitting events could add a |
I'm not sure I agree, but even if we decide we want event name, I think it would be fine (maybe even better?) to introduce a new method |
As for Go SIG we are not worried about adding a parameter in future. We decided to favor future-compatibilty instead of slightly better ergonomics. I am not sure if this issue should be a blocker for stabilizing Logger.Enabled. |
If "event.name" is an attribute, then I totally agree! |
It is possible that it will be a parameter for a dedicated enabled method for events (and not for log records): |
Closing per #4220 (comment) and #4220 (comment) |
There is a an open question whether EventName (or EventID) should be added as an optional parameter to Logger.Enabled.
Originally posted by @cijothomas in #4203 (comment)
The text was updated successfully, but these errors were encountered: