You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would love to move to an otel logger from slog using the slog bridge, but there is one feature that I would miss.
The HandlerOptions used to configure a slog JSONHandler or TextHandler allow for a bool toggle AddSource which, when set, will include the source file information of where the log occurred in the log attributes.
Proposed Solution
I would like to add a bool source field to the otelslog config that is set in a new WithSource Option that takes a bool as a parameter. When source is set, the otelbridge would mimic the behavior of the slog options and include the source information of the log as attributes when converting the slog record.
The text was updated successfully, but these errors were encountered:
Problem Statement
I would love to move to an otel logger from slog using the slog bridge, but there is one feature that I would miss.
The HandlerOptions used to configure a slog JSONHandler or TextHandler allow for a bool toggle
AddSource
which, when set, will include the source file information of where the log occurred in the log attributes.Proposed Solution
I would like to add a bool
source
field to the otelslog config that is set in a newWithSource
Option that takes a bool as a parameter. Whensource
is set, the otelbridge would mimic the behavior of the slog options and include the source information of the log as attributes when converting the slog record.The text was updated successfully, but these errors were encountered: