@@ -689,22 +689,24 @@ export class WebSocketManager {
689689 `received ${ prettyMessageMB } transition in ${ prettyTransitionTime } at ${ prettyBytesPerSecond } ` ,
690690 ) ;
691691
692- // Warnings that will show up for *all users*, so these are not very aggressive goals.
693- if ( transitionTransitTime > 10_000 && messageLength > 10_000_000 ) {
692+ // Warnings that will show up for *all users*, so don't be too aggressive.
693+ // These can be silenced (along with reconnection messages) by setting `logger: false` in client options.
694+ if ( messageLength > 20_000_000 ) {
695+ // Big enough that the developer should be made aware of this.
694696 this . logger . log (
695- `received query results totalling more than 10MB (${ prettyMessageMB } ) which took more than 10s (${ prettyTransitionTime } ) to arrive` ,
696- ) ;
697- } else if ( messageLength > 20_000_000 ) {
698- this . logger . log (
699- `received query results totalling more that 20MB (${ prettyMessageMB } ) which will take a long time to download on slower connections` ,
697+ `received query results totaling more that 20MB (${ prettyMessageMB } ) which will take a long time to download on slower connections` ,
700698 ) ;
701699 } else if ( transitionTransitTime > 20_000 ) {
700+ // Long enough that a pattern of these should be interesting to a developer, but be aware that
701+ // weak connections, putting clients to sleep, backgrounding etc. could all cause this too.
702702 this . logger . log (
703- `received query results totalling ${ prettyMessageMB } which took more than 20s to arrive (${ prettyTransitionTime } )` ,
703+ `received query results totaling ${ prettyMessageMB } which took more than 20s to arrive (${ prettyTransitionTime } )` ,
704704 ) ;
705705 }
706+
706707 if ( this . debug ) {
707- if ( transitionTransitTime > 10_000 || messageLength > 10_000_000 ) {
708+ // debug means "reportDebugInfoToConvex" is set so this can be aggressive.
709+ if ( transitionTransitTime > 2_000 ) {
708710 this . sendMessage ( {
709711 type : "Event" ,
710712 eventType : "ClientReceivedTransition" ,
0 commit comments