Skip to content

feat: opentelemetry sdk LoggerProvider #207

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

Open
wants to merge 43 commits into
base: master
Choose a base branch
from

Conversation

yuzurihaaa
Copy link
Contributor

Which problem is this PR solving?

  1. To add LoggerProvider in SDK.
  2. This is from Log SDK PR but broken down to be smaller. This PR only for LoggerProvider and related parameters to ease review.

How Has This Been Tested?

  1. Unit test

Checklist:

  • Unit tests have been added
  • Documentation has been updated

@yuzurihaaa
Copy link
Contributor Author

Hi @blakeroberts-wk , I saw that you've resolve some of the comments, but there are still some that are not resolved but I didn't see any feedback / response.

@yuzurihaaa
Copy link
Contributor Author

yuzurihaaa commented Feb 12, 2025

Currently failed on dart v2 but not on v3
> warning - lib/src/sdk/logs/logger_provider.dart:78:5 - Assignment to a variable of type 'void'. Try removing the assignment or changing the type of the variable. - void_checks
warning - lib/src/sdk/logs/logger_provider.dart:82:5 - Assignment to a variable of type 'void'. Try removing the assignment or changing the type of the variable. - void_checks

I'll look into this once review process is done.

After changed the return type to void this is no an issue.

@yuzurihaaa
Copy link
Contributor Author

Hi @blakeroberts-wk , been a while. Can I know if there are any issues that can be resolved. There are also issues that I need some help :)

body: body,
timeProvider: timeProvider,
);
onLogEmit?.call(log);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, I'm not sure it makes sense to follow either of those implementations. I imagine the designs above are due to legacy reasons or oversight. We should support multiple processors. Those other implementations accomplish this by introducing a MultiLogRecordProcessor. As far as I can tell, this is superfluous complexity. A logger provider should have a list of processors given to a logger during instantiation. This implementation follows the same lines as other providers (meter and tracer).

https://opentelemetry.io/docs/specs/otel/logs/sdk/#logrecordprocessor

@yuzurihaaa
Copy link
Contributor Author

Requesting for review on #207 (comment)

@yuzurihaaa
Copy link
Contributor Author

hi @blakeroberts-wk . Can I get some feedback on #207 (comment) if I got this right?

@yuzurihaaa yuzurihaaa force-pushed the feat/logger-provider branch from acd8b32 to d4a919f Compare March 18, 2025 05:06
@yuzurihaaa yuzurihaaa force-pushed the feat/logger-provider branch from d4a919f to 741ed89 Compare March 18, 2025 05:12
@yuzurihaaa
Copy link
Contributor Author

hi @blakeroberts-wk , can I know if there's any update? Or @evanweible-wf can help on the reviewing process?

@evanweible-wf evanweible-wf removed their request for review April 25, 2025 16:18
@yuzurihaaa
Copy link
Contributor Author

Hi @robbecker-wf . Sorry that I missed your message, I've added the changes from review.

@yuzurihaaa yuzurihaaa requested a review from blakeroberts-wk May 6, 2025 07:05
@yuzurihaaa
Copy link
Contributor Author

Hi @blakeroberts-wk , anything else that is pending from me to fix? In case if I missed something out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants