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
Is your feature request related to a problem? Please describe.
When using JsonObject from kotlinx.serialization.json.JsonObject I end up having quotes in my logger "attributes" after using logger.addAttribute. I found out that your SDK uses gson internally in your Logger.kt. This forces integrators to add gson dependency as well to have attributes without quotes " (the expected result in the second image).
kotlinx.serialization
google.gson
Describe the solution you'd like
I would love to have support for several serialization libraries (so that I am not dependent on gson). In particular it would be nice to have support for Kotlinx.serialization so that I can pass kotlinx.serialization.json.JsonObject as parameter.
Supporting:
Describe alternatives you've considered
For now the only alternative that was feasible was to integrate gson in my code.
I think an alternative would be to add every field of the attribute manually but it sounds cumbersome and error prone.
The text was updated successfully, but these errors were encountered:
Hi @dnhyde , thanks a lot for this feature request.
We totally understand that this would be an interesting feature, but we would need to find a way to support more serialization libraries with no added cost for our users. We do use Gson internally meaning that this is a dependency we will have no matter what, but adding support to other libraries (kotlinx.serialization, Moshi, …) will be an added cost for all of our customers, most of which won't use either.
We'll keep this feature request in mind and try to come up with a satisfying solution
Sure, I understand, maybe the approach that retrofit uses for converters could be a solution. Ideally it is possible to add even external converters on top of the existing ones as they did for kotlinx.serialization converter. Not sure if it feasible in your case, just an idea for the future :)
Are you requesting automatic instrumentation for a framework or library? Please describe.
1.3.2
Is your feature request related to a problem? Please describe.
When using
JsonObject
fromkotlinx.serialization.json.JsonObject
I end up having quotes in my logger "attributes" after usinglogger.addAttribute
. I found out that your SDK usesgson
internally in yourLogger.kt
. This forces integrators to addgson
dependency as well to have attributes without quotes"
(the expected result in the second image).Describe the solution you'd like
I would love to have support for several serialization libraries (so that I am not dependent on
gson
). In particular it would be nice to have support for Kotlinx.serialization so that I can passkotlinx.serialization.json.JsonObject
as parameter.Supporting:
Describe alternatives you've considered
For now the only alternative that was feasible was to integrate
gson
in my code.I think an alternative would be to add every field of the attribute manually but it sounds cumbersome and error prone.
The text was updated successfully, but these errors were encountered: