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

   ## Summary
   
   Fifth batch of AWS span decorators for `camel-telemetry`. Continues the work 
from #23038, #23040, #23045 and #23077 by covering the **Compute** group: 
virtual machines (EC2), container service (ECS), and managed Kubernetes (EKS).
   
   JIRA: [CAMEL-23387](https://issues.apache.org/jira/browse/CAMEL-23387) — 
_the JIRA stays open; only the AI/ML batch (Polly, Rekognition, Textract, 
Transcribe, Translate, Comprehend, S3 Vectors) remains for AWS coverage._
   
   ### Note on X-Ray scope reduction
   
   The original "Compute & Tracing" follow-up listed in #23045 and #23077 also 
mentioned `aws-xray`. That module no longer exists — `camel-aws-xray` was the 
**deprecated AWS X-Ray tracer integration** (its own `SegmentDecorator` system 
parallel to OpenTracing) and was removed in commit ba9f8c5340a ("Remove 
deprecated Amazon X-Ray component"). It is not a producer-style component and 
there is nothing to add a `SpanDecorator` for. This batch therefore covers EC2, 
ECS and EKS only.
   
   ## Changes
   
   New `SpanDecorator` implementations under 
`org.apache.camel.telemetry.decorators`:
   
   - **`AwsEc2SpanDecorator`** (`aws2-ec2`) — Elastic Compute Cloud. Tags: 
`operation`, `imageId`, `instanceType`, `subnetId`. Bulk request collections 
(instance IDs, security groups, tags, placement objects), key pair name, and 
EBS/monitoring/kernel flags are not surfaced.
   - **`AwsEcsSpanDecorator`** (`aws2-ecs`) — Elastic Container Service. Tags: 
`operation`, `clusterName`. The component's input header surface is small (the 
cluster ARN is response-shaped only and is not visible in `beforeTracingEvent`).
   - **`AwsEksSpanDecorator`** (`aws2-eks`) — Elastic Kubernetes Service. Tags: 
`operation`, `clusterName`, `roleArn`. The VPC config object and free-form 
description are not surfaced.
   
   All three decorators extend `AbstractSpanDecorator` (these are producer-only 
management APIs) and are registered alphabetically in 
`META-INF/services/org.apache.camel.telemetry.SpanDecorator`. Unit tests cover 
header-to-tag extraction for each decorator.
   
   Header constants are mirrored from each component's `*Constants` interface 
(with a Javadoc reference back to the source), matching the convention used by 
previous batches and `AzureServiceBusSpanDecorator`. This avoids creating hard 
dependencies from `camel-telemetry` to the AWS component modules.
   
   ### Tag selection rationale
   
   Same two rules applied across batches 3, 4 and now 5:
   
   1. **Never emit values that may contain secrets or large payloads** — VPC 
config objects (EKS), placement objects, security-group/instance-ID/tag 
collections (EC2), free-form descriptions (EKS).
   2. **Prefer the request _target_ over the response payload** — 
`clusterName`, `imageId`, `subnetId`, `instanceType`. Response ARNs (cluster 
ARNs in ECS/EKS, instance IDs from EC2 launch responses) are not tagged because 
they are response-shaped and not available in `beforeTracingEvent`.
   
   The EKS `roleArn` is the IAM role the cluster will assume at creation — this 
is an EC2/EKS resource ARN, not a credential, and it is the user-supplied input 
for the operation, so it is included.
   
   ## Test plan
   
   - [x] `mvn test` in `components/camel-telemetry` passes (124 tests, 
including 37 AWS decorator tests covering 29 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 | #23045 (merged) | Athena, CloudWatch, KMS, MSK, Step Functions, 
Timestream, Redshift Data, CloudTrail |
   | 4 | #23077 (merged) | STS, IAM, Secrets Manager, Parameter Store, Security 
Hub, Config |
   | 5 | this PR | EC2, ECS, EKS |
   
   ## Follow-ups still pending
   
   - **AI/ML components**: Polly, Rekognition, Textract, Transcribe, Translate, 
Comprehend, S3 Vectors — to be added in a final AWS PR.
   - **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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to