Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/maven_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ echo "=== Step 3: Upload to Sonatype Central Portal ==="
mvn clean deploy -s "${SETTINGS_FILE}" -pl sdk -P publishing -DskipTests --no-transfer-progress
mvn clean deploy -s "${SETTINGS_FILE}" -pl sdk-testing -P publishing -DskipTests --no-transfer-progress
mvn clean deploy -s "${SETTINGS_FILE}" -pl otel-plugin -P publishing -DskipTests --no-transfer-progress
mvn clean deploy -s "${SETTINGS_FILE}" -pl insight-plugin -P publishing -DskipTests --no-transfer-progress
mvn clean deploy -s "${SETTINGS_FILE}" -pl telemetry-exporter -P publishing -DskipTests --no-transfer-progress

echo "=== Release ${RELEASE_VERSION} uploaded successfully; review and publish it in Sonatype Central Portal. ==="
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:
- 'sdk/**'
- 'sdk-testing/**'
- 'sdk-integration-tests/**'
- 'insight-plugin/**'
- 'telemetry-exporter/**'
- 'otel-plugin/**'
- '.github/scripts/verify_otel_api_compatibility.py'
- 'examples/**'
Expand All @@ -43,7 +43,7 @@ on:
- 'sdk/**'
- 'sdk-testing/**'
- 'sdk-integration-tests/**'
- 'insight-plugin/**'
- 'telemetry-exporter/**'
- 'otel-plugin/**'
- '.github/scripts/verify_otel_api_compatibility.py'
- 'examples/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
"sdk/target/aws-durable-execution-sdk-java-${RELEASE_VERSION}.jar" \
"sdk-testing/target/aws-durable-execution-sdk-java-testing-${RELEASE_VERSION}.jar" \
"otel-plugin/target/aws-durable-execution-sdk-java-plugin-otel-${RELEASE_VERSION}.jar" \
"insight-plugin/target/aws-durable-execution-sdk-java-plugin-insight-${RELEASE_VERSION}.jar" \
"telemetry-exporter/target/aws-durable-execution-sdk-java-plugin-telemetry-exporter-${RELEASE_VERSION}.jar" \
--clobber

- name: Checkout default branch
Expand Down
6 changes: 3 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The publication workflow:
1. Verifies that the tag is a semantic version, points to a commit on the
default branch, and matches the Maven version in the tagged POM.
2. Builds, signs, and uploads the SDK, testing library, OpenTelemetry plugin,
and Workflow Insight plugin to Sonatype Central Portal.
and Durable Execution Telemetry Exporter to Sonatype Central Portal.
3. Uploads the four JARs to the existing GitHub release.
4. Opens a pull request for the next development version. A final release
increments the patch version, so `2.1.1` produces `2.1.2-SNAPSHOT`. A
Expand All @@ -56,8 +56,8 @@ After **Publish Maven Release** succeeds:
1. Open [Publishing Deployments](https://central.sonatype.com/publishing/deployments)
in Sonatype Central Portal.
2. Find the deployments for the release version and verify that they contain
the expected SDK, testing library, OpenTelemetry plugin, and Workflow Insight
plugin artifacts.
the expected SDK, testing library, OpenTelemetry plugin, and Durable Execution
Telemetry Exporter artifacts.
3. Click **Publish** for each deployment and wait for publication to complete.
The workflow uses `autoPublish=false`, so this manual action is required.
4. Confirm that the GitHub release contains the expected JARs and that the
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<module>sdk-testing</module>
<module>sdk-integration-tests</module>
<module>otel-plugin</module>
<module>insight-plugin</module>
<module>telemetry-exporter</module>
<module>examples</module>
<module>conformance-tests</module>
<module>coverage-report</module>
Expand Down
38 changes: 19 additions & 19 deletions insight-plugin/README.md → telemetry-exporter/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Workflow Insight Plugin (preview)
# Durable Execution Telemetry Exporter (preview)

Instrumentation plugin for the AWS Lambda Durable Execution Java SDK that emits a curated,
per-execution **Workflow Insight record** to one or more pluggable exporters. It ports the
JavaScript `workflowInsight()` contract (canonical record schema `1.0`) to the Java plugin hook
per-execution **Durable Execution Telemetry record** to one or more pluggable exporters. It ports the
JavaScript `durableExecutionTelemetry()` contract (canonical record schema `1.0`) to the Java plugin hook
surface.

> **Preview API.** Every public type is annotated
Expand All @@ -13,10 +13,10 @@ surface.

```java
DurableConfig config = DurableConfig.builder()
.withPlugins(WorkflowInsight.workflowInsight(WorkflowInsightConfig.builder()
.withPlugins(DurableExecutionTelemetry.durableExecutionTelemetry(DurableExecutionTelemetryConfig.builder()
.samplingRate(1.0)
.emitMode(WorkflowInsightConfig.EmitMode.ON_COMPLETE) // ON_COMPLETE | ON_CHANGE | ON_FAILURE
.operationDetail(WorkflowInsightConfig.OperationDetail.TOP_LEVEL) // TOP_LEVEL | FULL_TREE
.emitMode(DurableExecutionTelemetryConfig.EmitMode.ON_COMPLETE) // ON_COMPLETE | ON_CHANGE | ON_FAILURE
.operationDetail(DurableExecutionTelemetryConfig.OperationDetail.TOP_LEVEL) // TOP_LEVEL | FULL_TREE
.content(ContentConfig.builder()
.input(true).output(true).includeErrors(true)
.addOverride(OperationOverride.withResult("compute", r -> r))
Expand All @@ -28,7 +28,7 @@ DurableConfig config = DurableConfig.builder()

## Exporters

Implement `InsightExporter` for custom sinks. Every exporter has a builder with one setter per option and a
Implement `TelemetryExporter` for custom sinks. Every exporter has a builder with one setter per option and a
`maxRecordSizeBytes` override; records over the limit are truncated before export.

| Exporter | Destination | Operations rendering | Default size limit | Artifact (optional) |
Expand Down Expand Up @@ -66,8 +66,8 @@ at first export with a message naming the artifact; the plugin logs it and conti
Table keyed by `pk` (string), optionally with sort key `sk`. IAM: `dynamodb:PutItem`.

```java
DynamoDBExporter.builder().tableName("workflow-insight").build() // history: pk = ARN, sk = emittedAt
DynamoDBExporter.builder().tableName("workflow-insight").sortKey("").build() // upsert: pk only
DynamoDBExporter.builder().tableName("durable-execution-telemetry").build() // history: pk = ARN, sk = emittedAt
DynamoDBExporter.builder().tableName("durable-execution-telemetry").sortKey("").build() // upsert: pk only
```

### AuroraExporter
Expand All @@ -80,7 +80,7 @@ statement casts the values. IAM: `rds-data:ExecuteStatement`, `secretsmanager:Ge

```java
AuroraExporter.builder()
.resourceArn(clusterArn).secretArn(secretArn).database("insight")
.resourceArn(clusterArn).secretArn(secretArn).database("telemetry")
.engine(AuroraExporter.Engine.POSTGRESQL) // or MYSQL
.build()
```
Expand All @@ -92,14 +92,14 @@ columns; rows are upserted with `MERGE`. IAM: `redshift-data:ExecuteStatement` p
(Serverless) or `secretsmanager:GetSecretValue` / `redshift:GetClusterCredentialsWithIAM` (provisioned).

```java
RedshiftExporter.builder().workgroupName("insight").database("dev").build()
RedshiftExporter.builder().workgroupName("telemetry").database("dev").build()
RedshiftExporter.builder().clusterIdentifier("my-cluster").database("dev").secretArn(secretArn).build()
```

### OpenSearchExporter

Domain endpoint; the index is created on first write. The document id is the execution ARN. IAM (SigV4):
`es:ESHttpPut` on `domain/<name>/workflow-insight/*`.
`es:ESHttpPut` on `domain/<name>/durable-execution-telemetry/*`.

```java
OpenSearchExporter.builder().endpoint("https://my-domain.us-east-1.es.amazonaws.com").region("us-east-1").build()
Expand All @@ -111,24 +111,24 @@ OpenSearchExporter.builder().endpoint(url).auth(OpenSearchExporter.Auth.BASIC).u
Delivery stream with any destination. IAM: `firehose:PutRecord`.

```java
FirehoseExporter.builder().deliveryStreamName("workflow-insight").build()
FirehoseExporter.builder().deliveryStreamName("durable-execution-telemetry").build()
```

### EventBridgeExporter

Default bus or a custom bus. `DetailType` is the record status, so rules can match `FAILED`. IAM: `events:PutEvents`.

```java
EventBridgeExporter.builder().build() // default bus, source software.amazon.lambda.durable.insight
EventBridgeExporter.builder().eventBusName("insight-bus").build()
EventBridgeExporter.builder().build() // default bus, source software.amazon.lambda.durable.telemetry
EventBridgeExporter.builder().eventBusName("telemetry-bus").build()
```

### SQSExporter

Standard or FIFO queue; FIFO queues receive a group id (execution ARN) and a deduplication id. IAM: `sqs:SendMessage`.

```java
SQSExporter.builder().queueUrl("https://sqs.us-east-1.amazonaws.com/123456789012/insight.fifo").build()
SQSExporter.builder().queueUrl("https://sqs.us-east-1.amazonaws.com/123456789012/telemetry.fifo").build()
```

### OTelExporter
Expand All @@ -144,7 +144,7 @@ OTelExporter.builder().endpoint("https://otlp.example.com/v1/logs").headers(Map.
Any endpoint accepting JSON. `timeoutMs` defaults to 10000. No IAM.

```java
HttpExporter.builder().url("https://hooks.example.com/insight").method(HttpExporter.Method.PUT).build()
HttpExporter.builder().url("https://hooks.example.com/telemetry").method(HttpExporter.Method.PUT).build()
```

### FileExporter
Expand All @@ -153,7 +153,7 @@ A writable directory such as an EFS mount or `/tmp`. `NDJSON` appends `{date}.nd
`{executionName}.json`.

```java
FileExporter.builder().directory("/mnt/efs/workflow-insight").mode(FileExporter.Mode.JSON).build()
FileExporter.builder().directory("/mnt/efs/durable-execution-telemetry").mode(FileExporter.Mode.JSON).build()
```

### S3Exporter and CloudWatchLogsExporter
Expand Down Expand Up @@ -213,5 +213,5 @@ one event per record to `{logStreamPrefix}YYYY/MM/DD` (IAM: `logs:CreateLogStrea

## Conformance

Validated against the Workflow Insight conformance suite behaviors `insight-1 … insight-18`
Validated against the Durable Execution Telemetry conformance suite behaviors `telemetry-1 … telemetry-18`
(PR #73 Java examples). See the module tests for the behavior mapping.
6 changes: 3 additions & 3 deletions insight-plugin/pom.xml → telemetry-exporter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<version>2.2.2-SNAPSHOT</version>
</parent>

<artifactId>aws-durable-execution-sdk-java-plugin-insight</artifactId>
<name>AWS Lambda Durable Execution SDK Workflow Insight Plugin</name>
<description>Workflow Insight instrumentation plugin for AWS Lambda Durable Execution SDK</description>
<artifactId>aws-durable-execution-sdk-java-plugin-telemetry-exporter</artifactId>
<name>Durable Execution Telemetry Exporter</name>
<description>Durable Execution Telemetry exporter plugin for AWS Lambda Durable Execution SDK</description>

<dependencies>
<!-- Durable Execution SDK (for the plugin interface) -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package software.amazon.lambda.durable.insight;
package software.amazon.lambda.durable.telemetry;

import software.amazon.lambda.durable.annotations.Experimental;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package software.amazon.lambda.durable.insight;
package software.amazon.lambda.durable.telemetry;

import java.util.ArrayList;
import java.util.List;
Expand Down
Loading
Loading