Skip to content

feat(telemetry): add Durable Execution Telemetry conformance test handlers - #822

Merged
ParidelPooya merged 1 commit into
mainfrom
feat/conformance-tests-telemetry
Oct 24, 2026
Merged

ParidelPooya merged 1 commit into
mainfrom
feat/conformance-tests-telemetry

Conversation

@hln33

@hln33 hln33 commented Oct 23, 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

None. Related: aws/aws-durable-execution-conformance-tests#144 adds the telemetry suite and runner extension that deploys and validates the handler in this PR. JS counterpart: aws/aws-durable-execution-sdk-js#1046. The PRs are independent to merge, but the suite only has a Python target once this PR is in.

Description

Adds packages/aws-durable-execution-sdk-python-conformance-tests-telemetry. It holds the Python handler and SAM template for the telemetry conformance suite in aws/aws-durable-execution-conformance-tests (package aws-durable-execution-conformance-tests-telemetry).

The suite answers one question. Does aws-durable-execution-sdk-python-telemetry-exporter with CloudWatchLogsExporter deliver a complete DurableExecutionTelemetry record to CloudWatch Logs for a real Lambda execution? Unit tests show that the plugin builds a record. They do not show that the record reaches the log group on a deployed function. So the handler is deployed and invoked once. The runner fetches the record and checks it against requirement telemetry-1.

The package mirrors aws-durable-execution-sdk-python-conformance-tests-otel. The handler src/telemetry_1_success.py runs one step named increment and returns {"value": 42} for the event {"value": 41}. It configures the plugin with only a CloudWatchLogsExporter, emit mode on-complete, sampling rate 1, operation detail top-level, and content input and output enabled. It builds no record and calls no exporter method. It raises at import if TELEMETRY_LOG_GROUP_NAME is unset.

The template declares TelemetryLogGroupName, creates the log group with AWS::Logs::LogGroup, and passes the name through TELEMETRY_LOG_GROUP_NAME. src/requirements.txt installs the core SDK and the exporter from git at ${PYTHON_SDK_REF}.

Root change: pyproject.toml adds the package tests to testpaths.

A caller GitHub workflow that runs the suite per PR is a follow-on.

Demo/Screenshots

Not applicable.

Checklist

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

Conformance result

Run name: tr-py (stack conformance-tests-tr-py), region us-west-2, commit 42e2e345f5e1db8dfd7651e1cd2c7bb6aef175b3.

  • Build and deploy: succeeded.
  • Execution: succeeded. The handler ran and the runner fetched one record from the log group.
  • History: no history error was reported.
  • Record shape: telemetry-1 FAILED with three errors. The runner printed them verbatim:
Durable Execution Telemetry: record[0]: emittedAt: value '2026-10-23T20:41:20.394897Z' does not match regex pattern '^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$'
Durable Execution Telemetry: record[0]: startTime: value '2026-10-23T20:41:18.434000Z' does not match regex pattern '^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$'
Durable Execution Telemetry: record[0]: endTime: value '2026-10-23T20:41:20.394873Z' does not match regex pattern '^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$'

The suite pins timestamps to the JS format: UTC, Z, exactly 3 fraction digits. The Python exporter writes 6 fraction digits. These are the exporter's deviations from the JS reference format. They are out of scope for this PR.

Testing

Unit Tests

tests/test_telemetry_examples.py: 12 tests. They cover template-to-handler wiring, requirement coverage (["telemetry-1"]), the Makefile build target, the requirements.txt pins, and the TelemetryLogGroupName contract. hatch run test:all packages/aws-durable-execution-sdk-python-conformance-tests-telemetry/tests passes. ruff check and ruff format --check pass.

Integration Tests

The deployed suite is the integration test. The tr-py run above used the conformance runner with --suite telemetry. Per-PR CI wiring follows in a later change.

Examples

Not applicable. The handler is the example the suite deploys.

@github-actions

This comment has been minimized.

@hln33
hln33 force-pushed the feat/conformance-tests-telemetry branch from ccc5489 to a7c6c4e Compare October 24, 2026 01:27
@hln33
hln33 temporarily deployed to ai-pr-review-runtime October 24, 2026 01:27 — with GitHub Actions Inactive
@github-actions

This comment has been minimized.

@hln33
hln33 added this pull request to stack #828 October 24, 2026 02:31
@ParidelPooya
ParidelPooya deployed to ai-pr-review-runtime October 24, 2026 20:15 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@ParidelPooya
ParidelPooya force-pushed the feat/conformance-tests-telemetry branch from fd1d2f7 to c7098ac Compare October 24, 2026 21:39
@ParidelPooya

Copy link
Copy Markdown
Contributor

Rebased onto main (c7098ac) while you are away, replacing the earlier merge commit with a linear history. The package content is unchanged, and its 12 wiring tests pass. #827 is rebased onto the new head too.

@ParidelPooya
ParidelPooya deployed to ai-pr-review-runtime October 24, 2026 21:39 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. The prior dependency-version mismatch is fixed. Review was static; tests were not run. Residual test risk is SAM deployment and CloudWatch delivery, which the added wiring tests do not exercise.

Reviewed commit c7098ac15264d8631f9313986c575398940a9b18. Workflow run

@ParidelPooya
ParidelPooya merged commit ddeaa23 into main Oct 24, 2026
23 checks passed
@ParidelPooya
ParidelPooya deleted the feat/conformance-tests-telemetry branch October 24, 2026 22:04

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — c7098ac1 Deployed Oct 24, 2026 by ParidelPooya via ai-pr-review / Codex review / Generate Codex review #2363
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.

2 participants