Skip to content

feat: add Workflow Insight plugin - #661

Merged
wangyb-A merged 7 commits into
mainfrom
workflow-insight-plugin
Sep 9, 2026
Merged

feat: add Workflow Insight plugin#661
wangyb-A merged 7 commits into
mainfrom
workflow-insight-plugin

Conversation

@wangyb-A

@wangyb-A wangyb-A commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

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

Issue Link, if available

#679

Description

Adds the preview Workflow Insight plugin as a new insight-plugin Maven module.

The plugin emits schema-versioned execution records from the existing Java plugin hooks and matches the JavaScript Workflow Insight contract. It includes:

  • deterministic per-execution sampling and on-complete, on-failure, and on-change emission modes
  • execution input/output transforms, operation filtering, error controls, and result opt-in transforms
  • top-level and full-tree operation detail
  • operations-array and operationsByName record shapes
  • per-exporter record-size truncation
  • Lambda log, Amazon S3, and CloudWatch Logs exporters
  • exporter failure isolation and flushing

The implementation uses the invocation operation snapshots, execution payloads, errors, attempts, and serialized operation results already exposed by the Java plugin API. No core hook changes are required.

Demo/Screenshots

No UI change. insight-plugin/README.md contains a usage example. The draft conformance PR linked above contains Java handlers for all 18 Workflow Insight requirements.

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Yes. The module adds 35 tests covering record construction, sampling, emission modes, replay/suspension state, operation filtering, result transforms, aggregation, truncation, exporter requests, failure isolation, and flush behavior.

mvn -q -pl insight-plugin -am test
mvn -q -pl insight-plugin -am clean verify

Both pass.

The full repository reactor also passes:

mvn -q clean verify

Integration Tests

Yes. WorkflowInsightPluginTest exercises the plugin through LocalDurableTestRunner.

The draft Workflow Insight conformance suite was also run against deployed Java 21 Lambda functions in us-west-2:

  • S3 operations-array leg: 18 passed, 0 failed
  • CloudWatch operationsByName leg: 18 passed, 0 failed

Sink-specific assertions were capability-gated and exercised by the complementary leg.

Examples

The module README includes configuration and exporter usage. Customer-facing conformance handlers are in aws/aws-durable-execution-conformance-tests#73 rather than this repository, following the repository's conformance-test ownership rule.

@wangyb-A
wangyb-A force-pushed the workflow-insight-plugin branch from 5d83fc9 to 9cb8201 Compare August 28, 2026 18:06
@wangyb-A
wangyb-A marked this pull request as ready for review August 28, 2026 18:38
@wangyb-A
wangyb-A requested a review from a team August 28, 2026 18:38
@wangyb-A
wangyb-A temporarily deployed to ai-pr-review-runtime August 28, 2026 18:38 — with GitHub Actions Inactive
@wangyb-A
wangyb-A had a problem deploying to ai-pr-review-runtime August 28, 2026 18:40 — with GitHub Actions Failure
@wangyb-A
wangyb-A temporarily deployed to ai-pr-review-runtime August 28, 2026 18:40 — with GitHub Actions Inactive
Comment thread pom.xml
Comment thread insight-plugin/src/main/java/software/amazon/lambda/durable/insight/Json.java Outdated
@github-actions

This comment has been minimized.

@zhongkechen

Copy link
Copy Markdown
Contributor

Use /ai review command to trigger AI review workflows for draft PRs

@wangyb-A
wangyb-A marked this pull request as draft August 28, 2026 19:22
@wangyb-A
wangyb-A force-pushed the workflow-insight-plugin branch from d90f91f to bdbd88f Compare August 28, 2026 21:00
@wangyb-A

Copy link
Copy Markdown
Contributor Author

/ai review

Comment thread pom.xml
Comment thread insight-plugin/src/main/java/software/amazon/lambda/durable/insight/Json.java Outdated
@github-actions

This comment has been minimized.

@wangyb-A
wangyb-A force-pushed the workflow-insight-plugin branch from bdbd88f to 24e28b8 Compare August 31, 2026 22:49
@wangyb-A

Copy link
Copy Markdown
Contributor Author

/ai review

@github-actions

This comment has been minimized.

Alex Wang added 7 commits September 9, 2026 20:48
@wangyb-A
wangyb-A force-pushed the workflow-insight-plugin branch from 661ff21 to 7f3bdc4 Compare September 9, 2026 20:48
@wangyb-A
wangyb-A temporarily deployed to ai-pr-review-runtime September 9, 2026 20:56 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codex AI review

Nine confirmed issues remain, mainly around checkpoint lifecycle blocking, record fidelity, truncation, and exporter safeguards. Current tests miss important custom-SerDes, null, suspension, and oversized-record paths.

Reviewed commit 7f3bdc4e67fc71884846370ed3fa3b98f5eb4842. Workflow run

@wangyb-A

wangyb-A commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

The new findings are being tracked in #679

Fix the first 3 blocking issues, the last one is tracked in the 679 and will be implemented in the next PR. @ParidelPooya

@wangyb-A
wangyb-A merged commit 8505ec4 into main Sep 9, 2026
48 of 49 checks passed
@wangyb-A
wangyb-A deleted the workflow-insight-plugin branch September 9, 2026 22:15
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.

3 participants