Skip to content

[core + 3 more] Route logging retention and tracing through the compute - #504

Closed
Simone319 wants to merge 1 commit into
mainfrom
zimzha/compute-observability-logging-tracing
Closed

[core + 3 more] Route logging retention and tracing through the compute#504
Simone319 wants to merge 1 commit into
mainfrom
zimzha/compute-observability-logging-tracing

Conversation

@Simone319

@Simone319 Simone319 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Part 1 of 2 (stacked) — the compute observability seam, split out of #462.

What

Move logging-retention and tracing ownership from the observability Building Blocks into the Compute abstraction:

  • Compute.enableLogging(retentionDays?) — sets retention on the compute's single log group when a value is given; owns the last-wins + synth conflict-warning policy across multiple Loggers.
  • Compute.enableTracing() — turns on active X-Ray tracing + trace-publish permission on the shared role.
  • applyLogRetention / applyTracing are protected abstract hooks implemented by LambdaCompute, so the policy always runs.
  • bb-logger and bb-tracer now delegate to the resolved compute instead of reaching into the shared handler's log group / function directly.

No dashboard changes here — those are in the stacked PR on top.

Stack

Test

build, biome check, lint:deps, and unit tests (bb-lambda-compute, bb-logger, bb-tracer, bb-async-job, bb-cron-job, core targeted) pass on Node 22.

Move retention and X-Ray ownership from bb-logger/bb-tracer into the Compute
abstraction: enableLogging(retentionDays?) sets retention on the compute's own
log group (last-wins + synth conflict warning), and enableTracing() turns on
active X-Ray + trace-publish permission. Both delegate to protected
applyLogRetention/applyTracing hooks implemented by the concrete compute.

bb-logger and bb-tracer now call the compute seam instead of reaching into the
shared handler's log group / function directly.
@changeset-bot

changeset-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a24eaea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@aws-blocks/core Patch
@aws-blocks/bb-lambda-compute Patch
@aws-blocks/bb-logger Patch
@aws-blocks/bb-tracer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Simone319 Simone319 changed the title zimzha/compute observability logging tracing [core + 3 more] Route logging retention and tracing through the compute Sep 7, 2026
@Simone319 Simone319 closed this Sep 9, 2026
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