-
Notifications
You must be signed in to change notification settings - Fork 646
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
Record logger name as the instrumentation scope name #2485
Comments
A follow up question for this feature - Currently Is this a design change we are willing to make? |
Correct, the broader agreement was to maintain a map of scope: logger and use them. It would be great if we could have benchmarking numbers and memory requirements. |
Thanks @srikanthccv . |
I don't know if it's ever written somewhere in the issues, but there was a slack channel where this discussion happened. I can probably look it ups and link here. Here are the benchmarks java did when it had to make this decision open-telemetry/opentelemetry-specification#1236 (comment). |
@tm0nk can you link the Java PR for this that you mentioned? I haven't been super involved in the Logging API/SDK but I'm a little surprised that a bridging API doesn't allow passing the instrumentation scope name directly in the LogRecord. Would that be a possible implementation in our API instead of having to cache a |
@aabmass The analysis I mentioned for opentelemetry-java was done by Jack Berg, and he summarized it well in this comment: open-telemetry/opentelemetry-specification#1236 (comment) This comment makes it sound like they chose the path of not using a cache at all. However, the implementation of keeping one logger per instrumentation scope in the latest opentelemetry-java release (v1.37.0) does seem to be using a form of cache. It appears Can you describe in more detail the approach you have in mind that implements this in a bridging API? |
Will bring this up during the SIG meeting. |
@tm0nk I think this Java code is analogous to this issue. It looks like your PR, they just get a new logger for each log entry. I think it makes sense to have caching in the API to avoid creating a bunch of garbage. I guess I was just suprised there is no escape hatch for this kind of thing. We have MetricProducer in the Metrics SDK which allows emitting a batch of metrics including instrumentation scope directly. |
Hi @lzchen I was planning to pick this issue up to add the requested cache tests and benchmarks to the initial PR from @tm0nk. I noticed that an
|
As spec'd here open-telemetry/opentelemetry-specification#2359
The text was updated successfully, but these errors were encountered: