-
Notifications
You must be signed in to change notification settings - Fork 23
Allow configuring OTEL_ values from any source #152
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
Conversation
Thanks for the PR @srogovtsev! In this sink, the top-level parameters on Could the setting instead be exposed as |
I wouldn't mind that at all, but wouldn't it be somewhat roundabout: we get a setting from
I'd prefer it to say "configuration", because the whole idea of this setting is to allow reading them from places other than environment, so I would find it confusing when the option |
Looking again, I think your way is better, since it sets up a nice clear relationship between the new option and
|
21051be
to
1d018e4
Compare
I have renamed the delegate parameter to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in this file are purely cosmetic (renaming getEnvironmentVariable
to getConfigurationVariable
) and can be discarded if they seem redundant
src/Serilog.Sinks.OpenTelemetry/OpenTelemetryLoggerConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
src/Serilog.Sinks.OpenTelemetry/OpenTelemetryLoggerConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nitpicks but otherwise LGTM!
Thanks @srogovtsev! |
This fixes #151 by exposing already existing configuration delegate.
I thought about adding some tests, but there's no good seam to verify the behavior and the code is as simple as it could be.