Conversation
…LP resource enrichment
…omplete child-span API
…ser agent, IP, breadcrumb events - Add http.user_agent, net.peer.ip, http.query_string attributes at span start - Populate request breadcrumb data field (method, url, userAgent) - Track startTime locally for accurate duration_ms calculation - Set http.status_code, http.route, duration_ms as extra attributes at span finish - Convert scope breadcrumbs to SpanEvent[] and pass to finishSpan for OTLP timeline - Add response breadcrumb (level-aware: error/warn/info) before finishing span - Include duration_ms in 5xx captureLog metadata - Add includeRequestBody / includeRequestHeaders opt-in options (with header sanitization) - Export logtideErrorHandler() from Express package for unhandled error capture
…e, harden headers denylist, move startTime capture
- Export logtideErrorHandler from @logtide/express public index
- Change http.status_code in captureLog from String(status) to status (number) for type consistency with span extraAttributes
- Move SENSITIVE_HEADERS Set to module level (avoid re-creating on every request); add set-cookie and proxy-authorization to the denylist
- Move startTime = Date.now() before addBreadcrumb so it captures actual request receipt time
- Merge duplicate type imports from @logtide/core into a single import line
- Replace (request as any).body casts with (request as unknown as { body?: unknown }).body in Fastify middleware
- Fix misleading test name: "should not set http.user_agent when User-Agent header is absent" -> "should set http.user_agent when User-Agent header is present"
…breadcrumb events - Add http.user_agent, net.peer.ip (x-forwarded-for), http.query_string to span start attributes - Populate request breadcrumb data field with method, url, userAgent - Capture startTime before breadcrumb for accurate duration measurement - Add response breadcrumb (type/category/level/data) before finishSpan - Convert scope breadcrumbs to SpanEvent[] and pass via finishSpan events option - Include http.status_code and duration_ms in extraAttributes on finishSpan - Forward http.route from Hono routePath when available - Add duration_ms to 5xx captureLog metadata - Handle catch block in Hono with response breadcrumb + events on finishSpan - Handle onError in Elysia with response breadcrumb + events on finishSpan - Store startTime in Elysia spanMap entry for accurate per-request duration - Add richer traces tests for both packages (status code, user agent, duration, events, query string, ip, route data)
…elysia format Extract a local breadcrumbsToEvents helper in both packages and replace the old flat data-key conversion with the richer format that includes breadcrumb.type, breadcrumb.category, breadcrumb.level, and data.* prefixed keys, matching the implementation already used by @logtide/hono and @logtide/elysia.
…hance breadcrumb events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces LogTide SDK version 0.6.0, focusing on improved tracing, richer metadata, and new APIs for hierarchical span management. The most significant changes include the addition of OTLP Span Events, new child span APIs, standardized span attributes, and enhanced error and response handling across frameworks. The update also includes bug fixes and version bumps for all packages.
Tracing and Span Management Enhancements:
startChildSpan()andfinishChildSpan()APIs in@logtide/corefor creating and finishing hierarchical child spans, with corresponding unit tests. [1] [2] [3]Richer Metadata and Standardization:
http.user_agent,net.peer.ip,http.query_stringat span start, andhttp.status_code,duration_ms,http.routeat span finish. [1] [2] [3]Framework Integrations and Error Handling:
logtideErrorHandlerfor Express to capture unhandled errors and associate them with the current request scope.Bug Fixes:
Version Updates:
0.6.0to reflect the new release. (package.json,packages/core/package.json,packages/angular/package.json) [1] [2] [3]