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
We are logging a list of strings using the LoggerExtensions approach (logger.LogInformation) (yes - I am aware this is not optimal from a performance POV). However, when we look in our OpenTelemetry backend the data is logged there as System.Collections.Immutable.ImmutableList`1[System.String] instead of as a collection.
I tried changing these lists to normal List but it was logged similarly (System.Collections.Generic.List`1[System.String]).
This is when using the AddOtlpExporter() approach for adding the exporter (using gRPC as the protocol if this matters). An interesting note though, is that when these logs are being written to console using the AddSimpleConsole() approach in Microsoft.Extensions.Logging, the lists are properly expanded to strings using value1, value2 notation (comma-separated). 🤔 Is this an oversight in OpenTelemetry .NET or are we doing things in the wrong way?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
We are logging a list of strings using the
LoggerExtensions
approach (logger.LogInformation
) (yes - I am aware this is not optimal from a performance POV). However, when we look in our OpenTelemetry backend the data is logged there asSystem.Collections.Immutable.ImmutableList`1[System.String]
instead of as a collection.I tried changing these lists to normal
List
but it was logged similarly (System.Collections.Generic.List`1[System.String]
).This is when using the
AddOtlpExporter()
approach for adding the exporter (using gRPC as the protocol if this matters). An interesting note though, is that when these logs are being written to console using theAddSimpleConsole()
approach inMicrosoft.Extensions.Logging
, the lists are properly expanded to strings usingvalue1, value2
notation (comma-separated). 🤔 Is this an oversight in OpenTelemetry .NET or are we doing things in the wrong way?Beta Was this translation helpful? Give feedback.
All reactions