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

Add EventName parameter to Logger.Enabled #4220

Open
pellared opened this issue Sep 20, 2024 · 2 comments
Open

Add EventName parameter to Logger.Enabled #4220

pellared opened this issue Sep 20, 2024 · 2 comments

Comments

@pellared
Copy link
Member

pellared commented Sep 20, 2024

There is a an open question whether EventName (or EventID) should be added as an optional parameter to Logger.Enabled.

Regd. EventName being used for EnabledCheck:

  1. It is very important (actually the EventId, the numerical, machine friendly version of EventName that is most important to do ultra fast checks!) for scenarios we are working on in OTel Rust, C++. I don't know if it is something every language/implementation cares about. Given spec does not prohibit an implementation from allowing more parameters, I am totally okay if spec does not mention it, as OTel C++/Rust can offer this as extras.
  2. From the Event Oteps, there were mention of scenarios where Loggers can filter based on EventName, route things to different places based on EventName etc. It'd be good to wait to see the progress on Events before we can really say if EventName is a important parameter for the Enabled check.

Originally posted by @cijothomas in #4203 (comment)

@pellared
Copy link
Member Author

pellared commented Sep 20, 2024

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.

@pellared
Copy link
Member Author

Spec SIG meeting notes:
The event name may be added before stabilizing the API.

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

1 participant