{"repo":"remychantenay/slog-otel","free":true,"listed":false,"github":"https://github.com/remychantenay/slog-otel","clone":"git clone https://github.com/remychantenay/slog-otel.git","description":"Go slog's Handler implementation to ensure correlation with Open-Telemetry spans.","language":"Go","stars":140,"topics":["golang","logging","open-telemetry","otel","slog","tracing"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"slog-otel Go package that provides an implementation of log/slog 's Handler interface that ensures a strong correlation between log records and Open-Telemetry spans by... 1. Adding span and trace IDs to the log record. 2. Adding context baggage members to the log record (can be disabled). 3. Adding log record as span event (can be disabled). 4. Adding log record attributes to the span event (can be disabled). 5. Setting span status based on slog record level (only if = slog.LevelError). Usage Example The following initial log: ... will be written as: and the related span will look like: License Apache License Version 2.0","default_branch":null,"files":null,"tree":[],"storefront":"/r/remychantenay","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/remychantenay/slog-otel/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}