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
Chromatrace is a Python package designed for advanced logging capabilities, including trace and request ID management. It provides a flexible logging configuration and supports colored logging for better visibility.
4
17
@@ -153,9 +166,38 @@ Something went wrong in second service
153
166
As you can see, the request ID - `R-ffe0a9a2` is automatically added to the log messages from the thread that handles the request.
The full example can be found in the [socket_app.py](src/examples/socket_app.py) file. I recommend you to check it out before making any decision. The client-side code can be found in the [socket_client.py](src/examples/socket_client.py) file.
Received message on main namespace. SID: FI3E_S_A-KsTi4RLAAAD, Message: Hello from the client
191
+
```
192
+
193
+
Yes, the socket logs are also within the trace. The trace ID - `S-4e2b7c5e` and `S-aaf46528` was added to the log messages. For better experience, the prefix `S` was added to the trace ID to differentiate it from the request ID.
194
+
195
+
156
196
## Examples
157
197
158
-
You can find examples of how to use Chromatrace in the [examples](src/exmples/) directory. Run the examples using the following command:
198
+
> You don't trust me, do you? I understand. You wanna see it in action, right? I got you covered. :)
199
+
200
+
You can find examples of how to use Chromatrace in the [examples](src/examples/) directory. Run the examples using the following command:
159
201
160
202
```bash
161
203
python main.py
@@ -167,7 +209,16 @@ Then, run:
167
209
curl 0.0.0.0:8000
168
210
```
169
211
170
-
Now, check the logs in the terminal. :)
212
+
Now, check the logs in the terminal.
213
+
214
+
Also, the socket server will start and wait for the client to connect on `http://localhost:8001`.
215
+
For socket client-side run the following command in another terminal:
0 commit comments