File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ private function logRequest(RpcLogEvent $event): void
3636 'severity ' => strtoupper (LogLevel::DEBUG ),
3737 'processId ' => $ event ->processId ?? null ,
3838 'requestId ' => $ event ->requestId ?? null ,
39+ 'rpcName ' => $ event ->rpcName ?? null ,
3940 ];
4041
4142 $ debugEvent = array_filter ($ debugEvent , fn ($ value ) => !is_null ($ value ));
Original file line number Diff line number Diff line change @@ -86,6 +86,18 @@ public function testLogResponse()
8686 $ this ->assertEquals ($ event ->headers , $ parsedDebugEvent ['jsonPayload ' ]['response.headers ' ]);
8787 }
8888
89+ public function testRpcNameShouldBeIncluded ()
90+ {
91+ $ event = $ this ->getNewLogEvent ();
92+ $ event ->headers = ['Thisis ' => 'a header ' ];
93+ $ this ->loggerContainer ->logRequest ($ event );
94+
95+ $ buffer = $ this ->getActualOutput ();
96+
97+ $ parsedDebugEvent = json_decode ($ buffer , true );
98+ $ this ->assertEquals ($ event ->rpcName , $ parsedDebugEvent ['rpcName ' ]);
99+ }
100+
89101 private function getNewLogEvent (): RpcLogEvent
90102 {
91103 $ event = new RpcLogEvent ();
You can’t perform that action at this time.
0 commit comments