statsig-io / java-server-sdk

An SDK for Java or Kotlin intended for multi-user/server environments
ISC License
7 stars 3 forks source link

How to get stacktrace from Statsig SDK? #25

Open mangatmodi opened 1 month ago

mangatmodi commented 1 month ago

I am getting following exception from the sdk, but I am not sure where just looking at the message

[Statsig]: An exception was caught:  com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected 
BEGIN_OBJECT but was STRING at line 1 column 1 path $

I want to get a full stacktrace. I found that Statsig uses a https://github.com/statsig-io/java-server-sdk/blob/main/src/main/kotlin/com/statsig/sdk/StatsigLogger.kt but I don't see a way to get the stacktrace.

tore-statsig commented 1 month ago

The logger is not an output logger, that is for batching and sending events to statsig servers. We do allow you to pass a customLogger in statsigoptions, but I dont think we have an error level that would output stack traces.

We will look into adding support for that