Add StartOTelEnrichment, GetOTelEnrichment, UpdateOTelEnrichment and StopOTelEnrichment over Query, JSON 1.0 and CBOR, with one configuration per account and Region as the user guide scopes it. Floci stores the configuration; enriching vended metrics comes next. Resource tag enrichment, the default, needs ObservabilityAdmin's resource tags for telemetry running in the Region: a start without it is the modeled ValidationError with the API reference's sentence, as AWS quotes no message. EnableTagEnrichment false needs nothing. A start while running changes nothing, an update replaces both filter lists as a pair and keeps the stored tag setting it omits, and an update while stopped is AWS's ResourceNotFoundException "OTel enrichment is not enabled for this account". A stopped enrichment reads as its status alone. Filters are validated as the model gives them, every violation listed in AWS's form, then against the 100 selectors allowed across both lists. A selector naming metrics without a namespace is refused as a null namespace over Query too, for metric streams as well, rather than read as no selector. Over JSON, a filter list sent as something else is refused with the deserializer's SerializationException, and EnableTagEnrichment sent as a string is read as the boolean it names or refused, so a malformed update changes nothing. Over Query, a filter name XML cannot carry is written as U+FFFD, for metric streams too. Part of #7030.
4.2 KiB
CloudWatch Observability Admin
Floci implements the REST JSON API of CloudWatch Observability Admin for the resource tags for telemetry feature, which CloudWatch's OpenTelemetry enrichment reads resource tags through. Requests are signed for observabilityadmin and served at the same endpoint as every other service.
Supported Actions
| Action | Description |
|---|---|
StartTelemetryEnrichment |
Starts resource tags for telemetry in the Region, creating its Resource Explorer managed view the first time. |
StopTelemetryEnrichment |
Stops resource tags for telemetry in the Region. |
GetTelemetryEnrichmentStatus |
Returns the feature's status, and its managed view's ARN while it runs. |
Behavior
- The feature is one switch per account and Region.
StartTelemetryEnrichmentanswers202withStatusRunningand the ARN of its Resource Explorer managed view,StopTelemetryEnrichmentanswers202withStatusStopped, andGetTelemetryEnrichmentStatusanswers the currentStatuswith the view's ARN while the feature runs, as the output's documentation gives it "if the feature is enabled". - Starting the feature has Resource Explorer create "an AWS index and managed view that indexes and discovers resources and tags in your account", as the CloudWatch user guide's "Resource tags for telemetry" says. The index is a
LOCALone, created only when the Region has none, and the view includes thetagsproperty.resource-explorer-2serves the view:GetManagedViewanswers it andListManagedViewslists it. - AWS documents the view but not its name, so Floci names it
AWSManagedViewForResourceTagsForTelemetry, in the form of the one managed view the Resource Explorer guide names,AWSManagedViewForSSM. Its ARN isarn:<partition>:resource-explorer-2:<region>:<account>:managed-view/AWSManagedViewForResourceTagsForTelemetry/<uuid>. ItsTrustedServiceistelemetry-enablement.observabilityadmin.amazonaws.com, the principal of the service-linked role whose policy (AWSObservabilityAdminTelemetryEnablementServiceRolePolicy) grants the featureresource-explorer-2:CreateManagedView. - The view outlives a stop: a feature stopped and started again answers the view its first start created.
- CloudWatch's
StartOTelEnrichmentwith resource tag enrichment needs the feature running in the same Region; see OTel enrichment. Stopping the feature leaves CloudWatch enrichment that already runs as it is. GetTelemetryEnrichmentStatusfor a feature never started in the Region answersResourceNotFoundException(404), the operation's modeled answer before the first start. Stopping a feature that is stopped, or was never started, answersStoppedand changes nothing, so a feature never started still reads as never started.- Floci changes the feature's state at once, so it is never caught between
RunningandStopped, is neverImpaired, and no request answersConflictException.
IAM
Under IAM enforcement (floci.services.iam.enforcement-enabled), each request is checked as its observabilityadmin: action, from the routes and request resources generated from botocore and the AWS Service Reference. The three actions act on no resource type and are checked on *. A refusal is AccessDeniedException with the 400 status the model declares for the service.
Not implemented
Telemetry rules, telemetry evaluation, centralization rules, telemetry pipelines, S3 table integrations, dataset integrations, third-party telemetry enrichment and resource telemetry listing are not emulated yet. Starting the feature does not grant Resource Explorer streaming access to a service.
Example
export AWS_ENDPOINT_URL=http://localhost:4566
aws observabilityadmin start-telemetry-enrichment
aws observabilityadmin get-telemetry-enrichment-status
aws resource-explorer-2 get-managed-view --managed-view-arn "$(aws observabilityadmin \
get-telemetry-enrichment-status --query AwsResourceExplorerManagedViewArn --output text)"
aws observabilityadmin stop-telemetry-enrichment