Skip to content

[Feature]: durable execution event hooks #370

@zhongkechen

Description

@zhongkechen

What would you like?

  • onOperationStart, onOperationEnd, onOperationAttemptStart, onOperationAttemptEnd fire at most once per operation/attempt.
  • onOperationAttemptStart and onOperationAttemptEnd will manage a span that is a child of the span managed by onOperationStart and onOperationEnd. That is retry attempts for steps and wait-for-condition operations.
  • onExecutionStart, onExecutionEnd fire at most once per execution
  • onInvocationStart, onInvocationEnd fire at most once per invocation

proposed design doc: https://github.com/aws/aws-durable-execution-sdk-js/blob/otel-instrumentation-design-v2/packages/aws-durable-execution-sdk-js/src/documents/PYTHON_SDK_OTEL_PLUGIN.md

Key Differences

There is a key difference in this implementation from JavaScript implementation

  • Python calls onOperationAttemptStart when an attempt is started , while JS calls it when the attempt is completed
  • Python calls onOperationStart when an operation is started, while JS calls it when the operation is completed

Possible Implementation

Similar work in TypeScript SDK for reference:

Is this a breaking change?

No

Does this require an RFC?

Yes

Additional Context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions