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
Integration and debugging would be easier if the package decoded the error messages returned from the Amplitude API and included these messages in the logs, or simply logged the JSON text verbatim without unmarshaling it.
Currently, if you make a mistake tracking an event, you see something like this in your logs:
Hi @moubry thanks for submitting this. This seems a valid concern and we will try to support better debugging for our SDK. cc @justin-fiedler@falconandy
Integration and debugging would be easier if the package decoded the error messages returned from the Amplitude API and included these messages in the logs, or simply logged the JSON text verbatim without unmarshaling it.
Currently, if you make a mistake tracking an event, you see something like this in your logs:
[00] amplitude-analytics2022/09/07 17:40:05 Info: HTTP request response%!(EXTRA *http.Response=&{400 Bad Request 400 HTTP/2.0 2 0 map[Access-Control-Allow-Methods:[GET, POST] Access-Control-Allow-Origin:[*] Content-Length:[115] Content-Type:[application/json] Date:[Wed, 07 Sep 2022 22:40:05 GMT] Strict-Transport-Security:[max-age=15768000] Trace-Id:[Root=1-63191dc5-2c964e046f02f68c1df60a75]] 0x140000b96a0 79 [] false false map[] 0x1400050a200 0x14000138580})
But the actual HTTP response looks something like this:
It would be nice to be able to see this error message “Invalid id length for user_id or device_id” logged.
The text was updated successfully, but these errors were encountered: