Skip to content

[core + 4 more] Compute-scoped observability and a per-compute Dashboard - #462

Closed
Simone319 wants to merge 1 commit into
mainfrom
zimzha/multi-compute-c4-c7-observability
Closed

[core + 4 more] Compute-scoped observability and a per-compute Dashboard#462
Simone319 wants to merge 1 commit into
mainfrom
zimzha/multi-compute-c4-c7-observability

Conversation

@Simone319

@Simone319 Simone319 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Problem

Observability Building Blocks (Logger, Tracer, Dashboard) touched the stack's single Lambda handler directly. For multi-compute, observability must attach to the compute that owns it, and the Dashboard must be able to render more than one compute.

Stacked on #460 (namespace recording) → #391 (config registry) → main. Bases retarget automatically as lower PRs merge. Review only this PR's layer (the observability change).

Changes

  • Compute (core): enableLogging(retention?) / enableTracing() public entry points that flip private loggerEnabled / tracerEnabled flags and drive protected provisionLogGroup / applyTracing hooks; single public dashboardSection(region) returning { label, health, logging?, tracing? }, gated on those flags.
  • Logger / Tracer: delegate to their resolved compute instead of poking the Lambda. Omitting a Logger retention keeps today's behavior (no LogGroup provisioned; Lambda's auto-created group applies).
  • Dashboard: organized by compute via computes?: Compute | Compute[] (defaults to the app's default compute); logs/traces sections appear automatically for computes with a Logger/Tracer attached. logger/tracer options removed (BREAKING); metrics move to metrics?: MetricsSource | MetricsSource[], pairing each Metrics BB with its own metricConfigs.
  • LambdaCompute: buildLambdaWidgetsbuildHealthWidgets; widget builders are protected and guard-throw when the corresponding observability BB is not attached.

Validation

  • Unit tests for the compute observability methods, gating, and the per-compute Dashboard layout.
  • Green locally: core 702, bb-lambda-compute 22, bb-dashboard 57, bb-logger 57, bb-tracer 38; full build + lint pass.

Checklist

  • PR description included
  • Tests are changed or added
  • Relevant documentation is changed or added (changeset compute-observability-methods.md; DESIGN/README updates)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@changeset-bot

changeset-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5847dba

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

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

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 force-pushed the zimzha/multi-compute-c4-c7-observability branch from 13b0eb8 to b0660ed Compare September 2, 2026 11:49
Base automatically changed from zimzha/multi-compute-c4-namespace-recording to main September 3, 2026 12:56
@Simone319
Simone319 force-pushed the zimzha/multi-compute-c4-c7-observability branch from b0660ed to bfa0c96 Compare September 7, 2026 10:40
…ashboard

Move the observability surface onto the compute. Compute gains
enableLogging(retention?) / enableTracing() — public entry points that
flip private loggerEnabled/tracerEnabled flags and drive the protected
provisionLogGroup/applyTracing infra hooks — plus dashboardSection(region),
the single public builder returning { label, health, logging?, tracing? }
gated on those flags. Logger and Tracer now delegate to their resolved
compute instead of touching the Lambda directly. Omitting the Logger's
retention keeps today's behavior: logging is marked enabled (the section
renders) but no LogGroup is provisioned — Lambda's auto-created group
applies (logs never expire).

Dashboard is organized by compute: it takes computes?: Compute | Compute[]
(defaulting to the app's default compute) and renders one group per
compute, with logs/traces appearing automatically for computes that have
a Logger/Tracer attached. The logger/tracer options are removed
(BREAKING). Metrics stay app-scoped and move to
metrics?: MetricsSource | MetricsSource[], pairing each Metrics BB with
its own metricConfigs so widget names stay namespace-correct.

LambdaCompute: buildLambdaWidgets renamed to buildHealthWidgets; widget
builders are protected and guard-throw when the corresponding
observability BB is not attached.
@Simone319

Copy link
Copy Markdown
Contributor Author

Superseded by a stacked split for easier review (same change, rebased onto latest main, split into two reviewable layers):

Closing in favor of the stack.

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