Skip to content

[codex] Add logging and tracing guide#47

Merged
samlaycock merged 2 commits into
mainfrom
codex/issue-35-logging-tracing-docs
May 13, 2026
Merged

[codex] Add logging and tracing guide#47
samlaycock merged 2 commits into
mainfrom
codex/issue-35-logging-tracing-docs

Conversation

@samlaycock

Copy link
Copy Markdown
Owner

Summary

  • Add a focused docs/logging-tracing.md guide covering fx.log, fx.logWarn, fx.logError, fx.span, and fx.trace.
  • Document structured log metadata, span attributes, span options, and how these helpers map to native Effect primitives.
  • Link the new guide from docs/README.md, tighten the API reference wording, add a README example, and include a patch changeset.

Why

Issue #35 notes that logging and tracing helpers are public API but only listed in the API reference. This PR gives users a focused behavior guide so they do not need to infer metadata and span semantics from source or Effect docs.

Validation

  • bun fmt
  • bun lint:fix
  • bun lint
  • bun typecheck
  • bun test

Closes #35.

Document the public logging and tracing helpers with structured log metadata examples, span attribute guidance, and their relationship to native Effect instrumentation.\n\nLink the focused guide from the docs index, update the API reference wording, add a README example, and include a patch changeset for the documentation update.
@samlaycock samlaycock marked this pull request as ready for review May 13, 2026 14:46
@greptile-apps

greptile-apps Bot commented May 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a focused docs/logging-tracing.md guide for fx.log, fx.logWarn, fx.logError, fx.span, and fx.trace, then links it from the docs index, README, and API reference. The documented signatures were verified against src/logging.ts and are accurate.

  • New guide (docs/logging-tracing.md): covers structured log metadata, span attributes, Tracer.SpanOptions, the mapping to native Effect primitives, and when to reach for fluent-effect/effect directly.
  • README / docs index: heading updated to "Retry, Timeout, Logging, Tracing", fx.log example added, and the new guide linked in both README.md and docs/README.md.
  • Changeset included as required by project conventions.

Confidence Score: 5/5

Documentation-only change; no runtime code is modified.

All changes are prose and Markdown. The documented API signatures match the source implementation exactly. No logic, types, or runtime behaviour are altered.

No files require special attention.

Important Files Changed

Filename Overview
docs/logging-tracing.md New guide covering fx.log/logWarn/logError and fx.span/trace; API signatures verified against src/logging.ts. One code block is missing the ts language tag.
README.md Section heading updated and fx.log example added; consistent with the new guide and existing examples.
docs/README.md New guide linked correctly in the docs index.
docs/api-reference.md API table descriptions tightened to mention structured metadata and span options.
.changeset/fair-pandas-trace.md Patch changeset added as required by AGENTS.md conventions.

Reviews (2): Last reviewed commit: "docs: fix logging example yield syntax" | Re-trigger Greptile

Comment thread docs/logging-tracing.md Outdated
Address the review comment by making the structured logging example use the same yield* generator syntax as the rest of the guide.\n\nThe Markdown fence is left generic because oxfmt rewrites yield* to yield * inside TypeScript Markdown fences.
@samlaycock samlaycock merged commit edb9380 into main May 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P3: Document logging and tracing semantics in a focused guide

1 participant