You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/05/07 13:11:22 UTC

[PR] CAMEL-23387: camel-telemetry - Add span decorators for Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data and CloudTrail [camel]

oscerd opened a new pull request, #23045:
URL: https://github.com/apache/camel/pull/23045

   ## Summary
   
   Third batch of AWS span decorators for `camel-telemetry`. Continues the work from #23038 (SQS/SNS/Kinesis/S3) and #23040 (DDB/DDB Streams/Lambda/EventBridge/SES/MQ/Firehose/Bedrock) by covering analytics/query, monitoring, security, managed Kafka, workflow, time-series DB, data warehouse and audit components.
   
   JIRA: [CAMEL-23387](https://issues.apache.org/jira/browse/CAMEL-23387) — _the JIRA stays open; further AWS components will land in subsequent PRs._
   
   ## Changes
   
   New `SpanDecorator` implementations under `org.apache.camel.telemetry.decorators`:
   
   - **`AwsAthenaSpanDecorator`** (`aws2-athena`) — Athena query service. Sets `db.system=athena`, `db.name=<database>`. Tags: `operation`, `database`, `queryExecutionId`, `workGroup`, `queryExecutionState`.
   - **`AwsCwSpanDecorator`** (`aws2-cw`) — CloudWatch metrics & alarms. Tags: `operation`, `metricNamespace`, `metricName`, `alarmName`, `alarmState`.
   - **`AwsKmsSpanDecorator`** (`aws2-kms`) — Key Management Service. Tags: `operation`, `keyId`, `keyArn`, `keyState`.
   - **`AwsMskSpanDecorator`** (`aws2-msk`) — Managed Streaming for Kafka (admin). Tags: `operation`, `clusterName`, `clusterArn`, `clusterState`.
   - **`AwsStepFunctionsSpanDecorator`** (`aws2-step-functions`) — Step Functions workflows. Tags: `operation`, `stateMachineName`, `stateMachineArn`, `executionArn`, `executionName`.
   - **`AwsTimestreamSpanDecorator`** (`aws2-timestream`) — Timestream time-series DB. Sets `db.system=timestream`, `db.name=<database>`. Tags: `operation`, `databaseName`, `tableName`.
   - **`AwsRedshiftDataSpanDecorator`** (`aws2-redshift-data`) — Redshift Data API. Sets `db.system=redshift`, `db.name=<database>`. Tags: `operation`, `clusterIdentifier`, `database`, `statementName`.
   - **`AwsCloudtrailSpanDecorator`** (`aws-cloudtrail`) — CloudTrail audit log consumer. Messaging-style decorator. Tags: `eventName`, `eventSource`, `username`. Message id from `EVENT_ID`.
   
   All eight decorators are registered alphabetically in `META-INF/services/org.apache.camel.telemetry.SpanDecorator`. Unit tests cover header-to-tag extraction for each decorator; CloudTrail also tests message-id extraction.
   
   The choice of base class follows the natural component shape:
   - **`AbstractMessagingSpanDecorator`** for the consumer-only audit stream (CloudTrail) — sets CONSUMER span kind and `messaging.destination.name`.
   - **`AbstractSpanDecorator`** for everything else.
   
   For the database/analytics components (Athena, Timestream, Redshift Data) the decorators set the standard semantic-conventions tags `db.system` and `db.name` so they can be filtered/aggregated alongside other DB spans (DDB, JDBC, SQL, MongoDB, Cassandra) using a uniform query.
   
   Header constants are mirrored from each component's `*Constants` interface (with a Javadoc reference back to the source), matching the convention already used by `AzureServiceBusSpanDecorator` and #23038/#23040. This avoids creating hard dependencies from `camel-telemetry` to the AWS component modules.
   
   ## Test plan
   
   - [x] `mvn test` in `components/camel-telemetry` passes (107 tests, including 28 AWS decorator tests covering 20 components total)
   - [x] Module-specific build (`mvn -DskipTests install`) succeeds
   - [x] No code style or formatter changes required
   
   ## Coverage so far on CAMEL-23387
   
   | Batch | PR | Components |
   |---|---|---|
   | 1 | #23038 (merged) | SQS, SNS, Kinesis, S3 |
   | 2 | #23040 (merged) | DDB, DDB Streams, Lambda, EventBridge, SES, MQ, Kinesis Firehose, Bedrock |
   | 3 | this PR | Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data, CloudTrail |
   
   ## Follow-ups still pending
   
   - Remaining AWS components: STS, IAM, EC2/ECS/EKS, Polly, Rekognition, Textract, Transcribe, Translate, Comprehend, S3 Vectors, Bedrock Agent, Bedrock Agent Runtime, Config, Parameter Store, Secrets Manager, Security Hub, X-Ray — to be added in subsequent PRs against the same JIRA.
   - Google Cloud decorators (mentioned in CAMEL-23387's description) — separate scope discussion / separate JIRA.
   
   ---
   
   _Claude Code on behalf of Andrea Cosentino_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23387: camel-telemetry - Add span decorators for Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data and CloudTrail [camel]

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on code in PR #23045:
URL: https://github.com/apache/camel/pull/23045#discussion_r3201765803


##########
components/camel-telemetry/src/main/java/org/apache/camel/telemetry/decorators/AwsCloudtrailSpanDecorator.java:
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.telemetry.decorators;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.telemetry.Span;
+
+public class AwsCloudtrailSpanDecorator extends AbstractMessagingSpanDecorator {
+
+    static final String CLOUDTRAIL_EVENT_NAME = "eventName";
+    static final String CLOUDTRAIL_EVENT_SOURCE = "eventSource";
+    static final String CLOUDTRAIL_USERNAME = "username";

Review Comment:
   Is it something that does really makes sense to include in a telemetry trace? It could leak PII IMO



##########
components/camel-telemetry/src/main/java/org/apache/camel/telemetry/decorators/AwsKmsSpanDecorator.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.telemetry.decorators;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.telemetry.Span;
+
+public class AwsKmsSpanDecorator extends AbstractSpanDecorator {
+
+    static final String KMS_OPERATION = "operation";
+    static final String KMS_KEY_ID = "keyId";

Review Comment:
   Not sure if this is something safe to include here. If that key is an API key for example, we should not.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23387: camel-telemetry - Add span decorators for Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data and CloudTrail [camel]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd merged PR #23045:
URL: https://github.com/apache/camel/pull/23045


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23387: camel-telemetry - Add span decorators for Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data and CloudTrail [camel]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on code in PR #23045:
URL: https://github.com/apache/camel/pull/23045#discussion_r3202895023


##########
components/camel-telemetry/src/main/java/org/apache/camel/telemetry/decorators/AwsCloudtrailSpanDecorator.java:
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.telemetry.decorators;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.telemetry.Span;
+
+public class AwsCloudtrailSpanDecorator extends AbstractMessagingSpanDecorator {
+
+    static final String CLOUDTRAIL_EVENT_NAME = "eventName";
+    static final String CLOUDTRAIL_EVENT_SOURCE = "eventSource";
+    static final String CLOUDTRAIL_USERNAME = "username";

Review Comment:
   This is the username of the account responsible for the event, so it's not really sensitive.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23387: camel-telemetry - Add span decorators for Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data and CloudTrail [camel]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on PR #23045:
URL: https://github.com/apache/camel/pull/23045#issuecomment-4398839105

   I'm removing both the keyId and the username.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23387: camel-telemetry - Add span decorators for Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data and CloudTrail [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23045:
URL: https://github.com/apache/camel/pull/23045#issuecomment-4397502968

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23387: camel-telemetry - Add span decorators for Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data and CloudTrail [camel]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on code in PR #23045:
URL: https://github.com/apache/camel/pull/23045#discussion_r3202940260


##########
components/camel-telemetry/src/main/java/org/apache/camel/telemetry/decorators/AwsCloudtrailSpanDecorator.java:
##########
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.telemetry.decorators;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.telemetry.Span;
+
+public class AwsCloudtrailSpanDecorator extends AbstractMessagingSpanDecorator {
+
+    static final String CLOUDTRAIL_EVENT_NAME = "eventName";
+    static final String CLOUDTRAIL_EVENT_SOURCE = "eventSource";
+    static final String CLOUDTRAIL_USERNAME = "username";

Review Comment:
   Fair point — dropped the `CLOUDTRAIL_USERNAME` tag entirely in cc7ed82 to be defensive about PII. Even though CloudTrail itself records the username publicly in the audit log, surfacing it in trace tags adds an extra place where an IAM user/role name could end up in observability backends, so removing it is the safer default. Will reconsider with an opt-in flag if a clear use case comes up.



##########
components/camel-telemetry/src/main/java/org/apache/camel/telemetry/decorators/AwsKmsSpanDecorator.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.telemetry.decorators;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.telemetry.Span;
+
+public class AwsKmsSpanDecorator extends AbstractSpanDecorator {
+
+    static final String KMS_OPERATION = "operation";
+    static final String KMS_KEY_ID = "keyId";

Review Comment:
   Took the defensive route on this one too — dropped `KMS_KEY_ID` in cc7ed82. The KMS key id is a non-secret identifier (not key material), but since users sometimes use aliases/identifiers that themselves carry meaning, removing it from trace tags keeps the surface minimal. The KMS key ARN is still emitted, which gives the same level of identification for tracing purposes without introducing the ambiguity.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23387: camel-telemetry - Add span decorators for Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data and CloudTrail [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23045:
URL: https://github.com/apache/camel/pull/23045#issuecomment-4397636024

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `components/camel-telemetry`
   
   <details><summary>All tested modules (12 modules)</summary>
   
   - Camel :: Common Telemetry
   - Camel :: JBang :: MCP
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: Launcher :: Container
   - Camel :: Micrometer :: Observability 2
   - Camel :: Observability Services
   - Camel :: Opentelemetry 2
   - Camel :: Telemetry :: Dev
   - Camel :: YAML DSL :: Validator
   - Camel :: YAML DSL :: Validator Maven Plugin
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/25497908363)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23387: camel-telemetry - Add span decorators for Athena, CloudWatch, KMS, MSK, Step Functions, Timestream, Redshift Data and CloudTrail [camel]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd commented on code in PR #23045:
URL: https://github.com/apache/camel/pull/23045#discussion_r3202892096


##########
components/camel-telemetry/src/main/java/org/apache/camel/telemetry/decorators/AwsKmsSpanDecorator.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.telemetry.decorators;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.telemetry.Span;
+
+public class AwsKmsSpanDecorator extends AbstractSpanDecorator {
+
+    static final String KMS_OPERATION = "operation";
+    static final String KMS_KEY_ID = "keyId";

Review Comment:
   This is the key ID in KMS, so it's not an API Key.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org