aws-durable-execution-sdk-python-telemetry-exporter 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/.gitignore +39 -0
  2. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/LICENSE +175 -0
  3. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/NOTICE +1 -0
  4. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/PKG-INFO +256 -0
  5. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/README.md +233 -0
  6. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/pyproject.toml +79 -0
  7. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/__about__.py +4 -0
  8. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/__init__.py +90 -0
  9. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/_export_scheduler.py +178 -0
  10. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/__init__.py +86 -0
  11. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/_common.py +109 -0
  12. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/aurora_exporter.py +152 -0
  13. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/cloudwatch_logs_exporter.py +96 -0
  14. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/dynamodb_exporter.py +75 -0
  15. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/eventbridge_exporter.py +82 -0
  16. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/file_exporter.py +88 -0
  17. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/firehose_exporter.py +63 -0
  18. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/http_exporter.py +82 -0
  19. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/lambda_log_exporter.py +41 -0
  20. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/opensearch_exporter.py +109 -0
  21. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/otel_exporter.py +151 -0
  22. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/redshift_exporter.py +155 -0
  23. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/s3_exporter.py +105 -0
  24. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/exporters/sqs_exporter.py +96 -0
  25. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/operations_index.py +132 -0
  26. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/plugin.py +452 -0
  27. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/py.typed +0 -0
  28. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/truncation.py +107 -0
  29. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/src/aws_durable_execution_sdk_python_telemetry_exporter/types.py +127 -0
  30. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/__init__.py +0 -0
  31. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/e2e/__init__.py +3 -0
  32. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/e2e/exporters_lifecycle_int_test.py +130 -0
  33. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/e2e/wait_suspend_resume_int_test.py +94 -0
  34. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_aurora_exporter.py +161 -0
  35. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_cloudwatch_logs_exporter.py +159 -0
  36. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_config.py +129 -0
  37. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_dynamodb_exporter.py +118 -0
  38. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_eventbridge_exporter.py +128 -0
  39. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_export_scheduler.py +255 -0
  40. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_exporters.py +274 -0
  41. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_file_exporter.py +149 -0
  42. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_firehose_exporter.py +118 -0
  43. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_http_exporter.py +224 -0
  44. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_opensearch_exporter.py +251 -0
  45. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_otel_exporter.py +255 -0
  46. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_plugin.py +663 -0
  47. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_redshift_exporter.py +183 -0
  48. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_shaping.py +162 -0
  49. aws_durable_execution_sdk_python_telemetry_exporter-0.0.1/tests/test_sqs_exporter.py +150 -0
@@ -0,0 +1,39 @@
1
+ *~
2
+ *#
3
+ *.swp
4
+ *.iml
5
+ *.DS_Store
6
+
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+ *.egg-info/
11
+
12
+ *.coverage
13
+ /.coverage
14
+ /.coverage.*
15
+ /.cache
16
+ /.pytest_cache
17
+ /.mypy_cache
18
+ /.vscode
19
+
20
+ /doc/_apidoc/
21
+ /build
22
+
23
+ .venv
24
+ .venv/
25
+
26
+ .attach_*
27
+
28
+ dist/
29
+
30
+ .idea
31
+
32
+ .kiro/
33
+
34
+ **/build/
35
+ **/*.zip
36
+ .aws-sam/
37
+ **/template.generated.json
38
+
39
+ .env
@@ -0,0 +1,175 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
@@ -0,0 +1 @@
1
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -0,0 +1,256 @@
1
+ Metadata-Version: 2.5
2
+ Name: aws-durable-execution-sdk-python-telemetry-exporter
3
+ Version: 0.0.1
4
+ Summary: Durable Execution Telemetry instrumentation plugin for the AWS Durable Execution SDK for Python
5
+ Project-URL: Documentation, https://github.com/aws/aws-durable-execution-sdk-python#readme
6
+ Project-URL: Issues, https://github.com/aws/aws-durable-execution-sdk-python/issues
7
+ Project-URL: Source, https://github.com/aws/aws-durable-execution-sdk-python
8
+ Author-email: AWS durable-execution-dev <durable-execution-dev@amazon.com>
9
+ License-Expression: Apache-2.0
10
+ Keywords: durable-execution,durable-execution-telemetry,observability
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: Implementation :: CPython
18
+ Requires-Python: >=3.11
19
+ Requires-Dist: aws-durable-execution-sdk-python>=2.0.0
20
+ Provides-Extra: s3
21
+ Requires-Dist: boto3>=1.26.0; extra == 's3'
22
+ Description-Content-Type: text/markdown
23
+
24
+ # AWS Durable Execution SDK for Python — Durable Execution Telemetry Exporter
25
+
26
+ Durable Execution Telemetry instrumentation plugin for the AWS Durable
27
+ Execution SDK for Python. A port of the JavaScript SDK's
28
+ `durableExecutionTelemetry()` plugin: it listens to the SDK's instrumentation
29
+ hooks and emits one curated `DurableExecutionTelemetry` record per execution
30
+ to the configured exporters. The wire record keeps the JS camelCase field
31
+ names so records read identically across SDKs.
32
+
33
+ > **Experimental.** Like its JS counterpart, this plugin is experimental and may
34
+ > change or be removed in future releases.
35
+
36
+ ## Install
37
+
38
+ ```bash
39
+ pip install aws-durable-execution-sdk-python-telemetry-exporter
40
+ # with the S3 exporter's local-dev dependency:
41
+ pip install "aws-durable-execution-sdk-python-telemetry-exporter[s3]"
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ ```python
47
+ from aws_durable_execution_sdk_python import durable_execution
48
+ from aws_durable_execution_sdk_python_telemetry_exporter import (
49
+ DurableExecutionTelemetryConfig,
50
+ durable_execution_telemetry,
51
+ )
52
+ from aws_durable_execution_sdk_python_telemetry_exporter.exporters import S3Exporter
53
+
54
+ @durable_execution(
55
+ plugins=[
56
+ durable_execution_telemetry(
57
+ DurableExecutionTelemetryConfig(
58
+ exporters=[
59
+ S3Exporter(bucket="my-bucket", prefix="durable-execution-telemetry/")
60
+ ],
61
+ )
62
+ )
63
+ ]
64
+ )
65
+ def handler(event, context):
66
+ ...
67
+ ```
68
+
69
+ With no exporter configured, records are written to the function's own
70
+ CloudWatch log group as single JSON lines (the `LambdaLogExporter` default),
71
+ carrying the name-keyed `operationsByName` summary. The `S3Exporter` writes the
72
+ lossless per-occurrence `operations` array, one object per execution
73
+ (upsert-by-execution-name, so re-emission overwrites rather than appends).
74
+
75
+ ## Exporters
76
+
77
+ All exporters live in `aws_durable_execution_sdk_python_telemetry_exporter.exporters` and
78
+ are re-exported from the package root. Each serializes the record as compact
79
+ JSON. Exporters that call AWS accept an injected `client=` for tests and use
80
+ the Lambda runtime's boto3 otherwise; none adds a required dependency.
81
+
82
+ | Exporter | Destination | Upsert | Operations shape | Default size limit |
83
+ | --- | --- | --- | --- | --- |
84
+ | `LambdaLogExporter` | Function's own log group | No | `operationsByName` | 256 KB |
85
+ | `CloudWatchLogsExporter` | Any log group, one stream per day | No | `operationsByName` | 256 KB |
86
+ | `S3Exporter` | S3 object per execution | Yes (key) | `operations` | 5 MB |
87
+ | `DynamoDBExporter` | DynamoDB item | Configurable | `operationsByName` | 400 KB |
88
+ | `AuroraExporter` | Aurora MySQL/PostgreSQL row (Data API) | Yes (upsert) | full record as JSON column | 1 MB |
89
+ | `RedshiftExporter` | Redshift row (Data API) | Yes (MERGE) | full record as SUPER column | 1 MB |
90
+ | `OpenSearchExporter` | OpenSearch document | Yes (`_id`) | `operations` | 10 MB |
91
+ | `FirehoseExporter` | Firehose delivery stream | N/A | `operations_format` | 1 MB |
92
+ | `EventBridgeExporter` | EventBridge event | N/A | `operations_format` | 256 KB |
93
+ | `SQSExporter` | SQS message | N/A | `operations_format` | 256 KB |
94
+ | `OTelExporter` | OTLP/HTTP logs endpoint | N/A | `operations_format` | 1 MB |
95
+ | `HttpExporter` | Any HTTP endpoint | N/A | `operations_format` | none |
96
+ | `FileExporter` | Directory (EFS, mount, `/tmp`) | Configurable | `operations_format` | none |
97
+
98
+ `operations_format` is `"array"` (default), `"by-name"`, or `"both"`
99
+ (`OperationsFormat`). `max_record_size_bytes` raises or lowers an exporter's
100
+ size limit; omitting it keeps the default. `HttpExporter` and `FileExporter`
101
+ have no default and do not truncate unless a limit is set.
102
+
103
+ ### CloudWatchLogsExporter
104
+
105
+ Writes one `PutLogEvents` event per record to `log_group_name`, in a stream
106
+ named `{log_stream_prefix}{YYYY}/{MM}/{DD}` (default prefix `durable-execution-telemetry/`).
107
+ IAM: `logs:CreateLogStream`, `logs:PutLogEvents` on the log group.
108
+
109
+ ```python
110
+ CloudWatchLogsExporter(log_group_name="/custom/durable-execution-telemetry")
111
+ ```
112
+
113
+ ### DynamoDBExporter
114
+
115
+ `PutItem` keyed by `partition_key` (default `pk`) = `executionArn`. With the
116
+ default `sort_key="sk"` (= `emittedAt`) every export adds an item; pass
117
+ `sort_key=None` for a key-only table that upserts. IAM: `dynamodb:PutItem`.
118
+
119
+ ```python
120
+ DynamoDBExporter(table_name="durable-execution-telemetry")
121
+ ```
122
+
123
+ ### AuroraExporter
124
+
125
+ Upserts a row by `execution_arn` through the RDS Data API; `engine` is
126
+ `"postgresql"` or `"mysql"` and selects the dialect. Columns: `execution_arn,
127
+ execution_name, function_name, status, start_time, end_time, duration_ms,
128
+ record_json, emitted_at`. IAM: `rds-data:ExecuteStatement`,
129
+ `secretsmanager:GetSecretValue`.
130
+
131
+ ```python
132
+ AuroraExporter(
133
+ resource_arn="arn:aws:rds:us-east-1:123456789012:cluster:my-cluster",
134
+ secret_arn="arn:aws:secretsmanager:us-east-1:123456789012:secret:my-db-creds",
135
+ database="telemetry",
136
+ engine="postgresql",
137
+ )
138
+ ```
139
+
140
+ ### RedshiftExporter
141
+
142
+ `MERGE` by `execution_arn` through the Redshift Data API into
143
+ `{schema}.{table}` (default `public.durable_execution_telemetry`, same columns as Aurora,
144
+ `record_json` as `SUPER`). Provide `workgroup_name` (Serverless) or
145
+ `cluster_identifier` (provisioned, with `db_user` or `secret_arn`). IAM:
146
+ `redshift-data:ExecuteStatement` plus `redshift-serverless:GetCredentials` or
147
+ `secretsmanager:GetSecretValue`. The statement is submitted and not awaited, so
148
+ statement failures are not reported and `on-change` records may land out of
149
+ order; prefer the default `on-complete` emit mode with this exporter.
150
+
151
+ ```python
152
+ RedshiftExporter(database="telemetry", workgroup_name="telemetry-wg")
153
+ ```
154
+
155
+ ### OpenSearchExporter
156
+
157
+ `PUT {endpoint}/{index_name}/_doc/{executionArn}` (default index
158
+ `durable-execution-telemetry`). `auth="sigv4"` (default) signs with the runtime's
159
+ credentials via botocore; `auth="basic"` uses `username`/`password`. IAM:
160
+ `es:ESHttpPut` on the domain.
161
+
162
+ ```python
163
+ OpenSearchExporter(endpoint="https://my-domain.us-east-1.es.amazonaws.com", region="us-east-1")
164
+ ```
165
+
166
+ ### FirehoseExporter
167
+
168
+ `PutRecord` of one JSON line (trailing newline) per record. IAM:
169
+ `firehose:PutRecord`.
170
+
171
+ ```python
172
+ FirehoseExporter(delivery_stream_name="durable-execution-telemetry-stream")
173
+ ```
174
+
175
+ ### EventBridgeExporter
176
+
177
+ `PutEvents` with `Source` (default `software.amazon.lambda.durable.telemetry`),
178
+ `DetailType` = record status, `Detail` = record. All arguments optional. IAM:
179
+ `events:PutEvents`.
180
+
181
+ ```python
182
+ EventBridgeExporter(event_bus_name="default")
183
+ ```
184
+
185
+ ### SQSExporter
186
+
187
+ `SendMessage` with the record as body and `status`/`functionName` message
188
+ attributes. A `.fifo` queue URL enables `MessageGroupId` (default
189
+ `executionArn`, or `message_group_id`) and a deduplication id of
190
+ `executionArn:emittedAt`. IAM: `sqs:SendMessage`.
191
+
192
+ ```python
193
+ SQSExporter(queue_url="https://sqs.us-east-1.amazonaws.com/123456789012/telemetry")
194
+ ```
195
+
196
+ ### OTelExporter
197
+
198
+ POSTs one OTLP `ExportLogsServiceRequest` (`http/json` only) per record to
199
+ `endpoint`; identity fields become attributes and the record is the log body.
200
+ Pass vendor auth in `headers`. No IAM.
201
+
202
+ ```python
203
+ OTelExporter(endpoint="https://otlp.vendor.com/v1/logs", headers={"x-api-key": "..."})
204
+ ```
205
+
206
+ ### HttpExporter
207
+
208
+ `POST` (or `method="PUT"`) the record as JSON to `url` with
209
+ `Content-Type: application/json` plus `headers`; a non-2xx status raises.
210
+ `timeout_ms` defaults to 10000 and currently applies to each socket operation
211
+ (the connect, each write of the request, and each read of the status line,
212
+ headers, and a non-2xx error body; a 2xx body is never read) rather than to the
213
+ whole request, so an endpoint that consumes or responds slowly can hold the
214
+ export open longer than `timeout_ms`; a future release may enforce it as a
215
+ whole-request deadline. No IAM.
216
+
217
+ ```python
218
+ HttpExporter(url="https://hooks.example.com/telemetry", headers={"Authorization": "Bearer ..."})
219
+ ```
220
+
221
+ ### FileExporter
222
+
223
+ `mode="ndjson"` (default) appends to `{directory}/{YYYY-MM-DD}.ndjson`;
224
+ `mode="json"` writes `{directory}/{executionName}.json`, overwriting on update.
225
+ For Lambda use an EFS mount (IAM: `elasticfilesystem:ClientMount`,
226
+ `elasticfilesystem:ClientWrite`) or `/tmp` for testing. Appends from many
227
+ concurrent environments to one NDJSON file on a network file system can
228
+ interleave; use `mode="json"` when several environments share a directory.
229
+
230
+ ```python
231
+ FileExporter(directory="/mnt/efs/durable-execution-telemetry")
232
+ ```
233
+
234
+ Emission behavior, record schema (`recordType: DurableExecutionTelemetry`,
235
+ `schemaVersion: "1.0"`), sampling, content configuration (input/output
236
+ omission, `include_errors`, per-operation result opt-in), truncation phases,
237
+ and `top-level` vs `full-tree` operation detail all mirror the JS plugin.
238
+ Behavior is validated cross-SDK by the `telemetry` conformance suite
239
+ (`aws-durable-execution-conformance-tests-telemetry`).
240
+
241
+ > **Note (asynchronous export).** Export rendering, truncation, `export()`, and
242
+ > `flush()` run on one lazy background worker per plugin. Checkpoint hooks only
243
+ > replace that execution's latest pending snapshot and wake the worker.
244
+ > Consecutive `on-change` snapshots for one execution coalesce whenever the
245
+ > worker has not yet claimed the previous one, including when no export is
246
+ > running, so under fast in-memory checkpoints (the local runner) a burst may
247
+ > deliver only its first and latest snapshots. Snapshots from different
248
+ > executions never coalesce with each other. An invocation that emits a record
249
+ > drains every pending snapshot and flushes exporters before it returns;
250
+ > invocations that emit nothing do not start or flush the worker.
251
+
252
+ ## Requirements
253
+
254
+ - `aws-durable-execution-sdk-python` with the plugin invocation hooks that
255
+ surface `execution_input` / `execution_result` (included since the version
256
+ this package declares as its minimum).