docs: add plugins page to SDK reference#208
Conversation
dcafd15 to
f2341fa
Compare
| --8<-- "examples/java/sdk-reference/plugins/use-plugin.java" | ||
| ``` | ||
|
|
||
| ## Logging from a plugin |
There was a problem hiding this comment.
The section should describe how you can enhance logs for each SDK via the plugin. You'll have to be more descriptive in each of these sections.
Namely, for Python and Java I don't know if this happens within a hook (I'm not sure how it works, but the description right now looks wrong).
There was a problem hiding this comment.
Rewrote the logging section for each language, need to confirm if they are correct.
|
|
||
| ### Checkpoint-change hook | ||
|
|
||
| `onOperationChange` fires when a checkpoint response reports that operations |
There was a problem hiding this comment.
We should add this hook to all SDK plugin interfaces @zhongkechen @wangyb-A @ayushiahjolia
| The SDK awaits `onInvocationEnd` before continuing the execution. All other | ||
| hooks are fire-and-forget. |
There was a problem hiding this comment.
is this true for Java? I thought all plugin hooks were awaited/synchronous/on the user thread
There was a problem hiding this comment.
Misunderstood the comments from the Java hooks, "fire-and-forgot" just refers to how they swallow errors / ignore returns. Removing this sentence.
| --8<-- "examples/typescript/sdk-reference/plugins/invocation-hooks.ts" | ||
| ``` | ||
|
|
||
| `onInvocationStart` and `onInvocationEnd` both return `Promise<void>`, and |
|
|
||
| === "Java" | ||
|
|
||
| The `onUserFunctionStart` and `onUserFunctionEnd` hooks run on the same |
There was a problem hiding this comment.
you can check against https://github.com/aws/aws-durable-execution-sdk-java/blob/main/otel-plugin/src/main/java/software/amazon/lambda/durable/otel/MdcSpanEnricher.java
this seems correct
|
|
||
| === "Python" | ||
|
|
||
| A plugin can enrich logs by installing a standard `logging.Filter` on the |
There was a problem hiding this comment.
Looks about right
Issue #, if available:
#205
Description of changes:
New Page
durable-execution/sdk-reference/plugins/plugins/:By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.