@echoteam/signoz-react 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.esm.js +3 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15716,11 +15716,13 @@ function addWebSocketLogging(config) {
|
|
|
15716
15716
|
if (typeof event.data === 'string') {
|
|
15717
15717
|
const truncatedData = truncateBody(event.data, config.maxBodyLogSize);
|
|
15718
15718
|
messageSpan.setAttribute('websocket.message', truncatedData);
|
|
15719
|
+
messageSpan.setAttribute('response.data', truncatedData); // Add response.data for consistency
|
|
15719
15720
|
// Try to parse JSON and extract message if exists
|
|
15720
15721
|
try {
|
|
15721
15722
|
const jsonData = JSON.parse(event.data);
|
|
15722
15723
|
if (jsonData.message) {
|
|
15723
15724
|
messageSpan.setAttribute('websocket.message.text', jsonData.message);
|
|
15725
|
+
messageSpan.setAttribute('response.message', jsonData.message); // Add response.message for consistency
|
|
15724
15726
|
}
|
|
15725
15727
|
if (jsonData.type || jsonData.event) {
|
|
15726
15728
|
messageSpan.setAttribute('websocket.message.type', jsonData.type || jsonData.event);
|
|
@@ -15736,6 +15738,7 @@ function addWebSocketLogging(config) {
|
|
|
15736
15738
|
else {
|
|
15737
15739
|
messageSpan.setAttribute('websocket.message', '[Binary Data]');
|
|
15738
15740
|
messageSpan.setAttribute('websocket.message.type', 'binary');
|
|
15741
|
+
messageSpan.setAttribute('response.data', '[Binary Data]'); // Add response.data for consistency
|
|
15739
15742
|
if (config.enableConsoleLog) {
|
|
15740
15743
|
console.log(`[SignOz] WebSocket Receive from ${wsUrl} on page ${pagePath}: [Binary Data]`);
|
|
15741
15744
|
}
|