Skip to content

test: cover custom logging trace correlation - #26

Merged
manas-fortifyroot merged 1 commit into
fr-v0.52.6.xfrom
fix/custom-logging-correlation-contract
May 27, 2026
Merged

test: cover custom logging trace correlation#26
manas-fortifyroot merged 1 commit into
fr-v0.52.6.xfrom
fix/custom-logging-correlation-contract

Conversation

@manas-fortifyroot

Copy link
Copy Markdown

Summary

Adds focused coverage for FortifyRoot/OpenLLMetry custom stdlib logging correlation behavior.

The original reported empty trace ID behavior is expected when a log is emitted outside any active span. This PR locks the fork-level contract that logs emitted inside an active span carry trace/span correlation, while logs outside active spans remain uncorrelated.

Changes

  • Added custom logging correlation test coverage in packages/traceloop-sdk.
  • Uses an in-memory capturing exporter to verify exported log records.
  • Avoids direct dependency on global tracer provider mutation.
  • Returns LogExportResult.SUCCESS when available to stay compatible with OTel processor expectations.

Validation

  • uv run pytest tests/test_logging_correlation.py -q
  • ./scripts/run-tests.sh --package 'traceloop-sdk'
  • ./scripts/run-tests.sh --all completed with no failing tests.

@manas-fortifyroot
manas-fortifyroot merged commit 002e565 into fr-v0.52.6.x May 27, 2026
9 checks passed
@manas-fortifyroot
manas-fortifyroot deleted the fix/custom-logging-correlation-contract branch May 27, 2026 09:13
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.

1 participant