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
When using open telemetry logger, and you have code like this:
usingvarlogger=Logger.BeginScope(newDictionary<string,string>(){{"Service","SuperImportantService"},{"FileName","FILE"}});Logger.LogDebug("Service name {name} is running on {computer}, and will process file {file}","NAME","COMPUTER","FILE");
And as you have more and more log statements, the amount of state keys gets higher. Some Exporters aggregate these keys into columns, and the columns start to expand to unmanageable amounts.
The request is to add a OpenTelemetryLoggerOptions called IncludeLogArguments that is defaulted to true. If true, it will append the log arguments. And if false, it will not include the log arguments.
Which alternative solutions or features have you considered?
The only alternative is to fix every log statement in code to be the same "key" name or to break logging practices and not use arguments in your logging statements.
Additional context
No response
The text was updated successfully, but these errors were encountered:
ttindell2
changed the title
Allow Ability to disable log state attributes but still include scope attributes
Allow Ability to disable log argument attributes but still include scope attributes
Jun 27, 2024
The only alternative is to fix every log statement in code to be the same "key" name
How would that help? There is no de-duplication done, so duplicates will be added to attributes!
I think we have some issues previously opened about controlling scopes more granularly, but dont think I have seen concerns about attributes itself. Maybe I didn't quite understand the concern raised in this issue...
Package
OpenTelemetry
Is your feature request related to a problem?
No response
What is the expected behavior?
When using open telemetry logger, and you have code like this:
you will get a log state with this:
And if you have another log in the same scope:
you will get a log state like this:
And as you have more and more log statements, the amount of state keys gets higher. Some Exporters aggregate these keys into columns, and the columns start to expand to unmanageable amounts.
The request is to add a OpenTelemetryLoggerOptions called
IncludeLogArguments
that is defaulted to true. If true, it will append the log arguments. And if false, it will not include the log arguments.Which alternative solutions or features have you considered?
The only alternative is to fix every log statement in code to be the same "key" name or to break logging practices and not use arguments in your logging statements.
Additional context
No response
The text was updated successfully, but these errors were encountered: