Skip to content

feat(examples): add Workflow Insight example - #693

Draft
wangyb-A wants to merge 3 commits into
mainfrom
workflow-insight-example
Draft

feat(examples): add Workflow Insight example#693
wangyb-A wants to merge 3 commits into
mainfrom
workflow-insight-example

Conversation

@wangyb-A

@wangyb-A wangyb-A commented Sep 9, 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

Depends on the Workflow Insight plugin merged in #661.

Description

Adds a customer-facing Workflow Insight example under the examples module. The handler registers an empty WorkflowInsightConfig so customers can see the minimum setup. The defaults use LambdaLogExporter, emit on completion, summarize top-level operations, and include input, output, and errors. Because the exporter writes to the function's own Lambda logs, the example requires no bucket, dedicated log group, or additional Lambda-role permissions.

Also adds local example coverage and a cloud integration assertion that invokes the deployed function, finds its uniquely correlated Workflow Insight record in CloudWatch Logs, accepts raw and structured Lambda log formats, and validates the emitted schema, status, content, and operation summaries.

Demo/Screenshots

Not applicable; this is a Java handler example and automated integration coverage with no UI changes.

Checklist

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

Testing

  • git diff --check
  • mvn -B -q spotless:check --file pom.xml
  • mvn -q -pl examples -am clean verify
  • mvn -q clean verify
  • Generated the SAM template to a scratch path and verified WorkflowInsightExampleFunction, its handler, managed log group, and workflow-insight-example suffix
  • Retargeted to main so the normal Java 17/21/25 E2E workflow builds, deploys, invokes, and validates the cloud example

Unit Tests

Yes. WorkflowInsightExampleTest uses LocalDurableTestRunner to verify successful output, default input behavior, and both named operations.

Integration Tests

Yes. CloudBasedIntegrationTest#testWorkflowInsightExample uses the deployed durable function and polls its managed CloudWatch log group for the actual LambdaLogExporter record. The normal E2E workflow is now running against this PR head.

Examples

Yes. WorkflowInsightExample demonstrates the minimum Workflow Insight plugin configuration with zero additional deployment infrastructure.

@wangyb-A
wangyb-A force-pushed the workflow-insight-plugin branch from ce1de5f to 661ff21 Compare September 9, 2026 18:42
@wangyb-A
wangyb-A force-pushed the workflow-insight-example branch from b77d49d to 7682f05 Compare September 9, 2026 18:44
@wangyb-A
wangyb-A added this pull request to stack #697 September 9, 2026 18:55
@wangyb-A
wangyb-A removed this pull request from stack #697 September 9, 2026 18:56
@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 force-pushed the workflow-insight-example branch from 4dba5db to 3de314d Compare September 9, 2026 20:59
@wangyb-A

wangyb-A commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/ai review

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. Residual risk is limited to CloudWatch ingestion and Lambda log-envelope variations, which are covered only by the cloud-gated test.

Reviewed commit 3de314d40760ed25ade62c99321196ebb0007da0. Workflow run

Base automatically changed from workflow-insight-plugin to main September 9, 2026 22:15
@wangyb-A
wangyb-A force-pushed the workflow-insight-example branch from 3de314d to 817e80a Compare September 9, 2026 22:18
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