feat(apprunner): add ObservabilityConfiguration for AppRunner Service#30359
feat(apprunner): add ObservabilityConfiguration for AppRunner Service#30359mergify[bot] merged 25 commits intoaws:mainfrom
Conversation
4dbae36 to
a4e11b4
Compare
c4002bf to
e73b10d
Compare
lpizzinidev
left a comment
There was a problem hiding this comment.
Thanks 👍
Left some comments for some minor adjustments and an open question on the vendor property.
| // AWS::AppRunner CloudFormation Resources: | ||
| export * from './service'; | ||
| export * from './vpc-connector'; | ||
| export * from './observability-configuration'; No newline at end of file |
There was a problem hiding this comment.
Can you please order this alphabetically?
packages/@aws-cdk/aws-apprunner-alpha/lib/observability-configuration.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-apprunner-alpha/lib/observability-configuration.ts
Outdated
Show resolved
Hide resolved
| /** | ||
| * The implementation provider chosen for tracing App Runner services. | ||
| * | ||
| * @default Vendor.AWSXRAY |
There was a problem hiding this comment.
| * @default Vendor.AWSXRAY | |
| * @default - tracing is not enabled for the service |
From the CloudFormation documentation, it seems we're allowed to omit this value.
Can you please verify if the construct deploys when that is the case?
Ie, changing the implementation to:
const resource = new CfnObservabilityConfiguration(this, 'Resource', {
observabilityConfigurationName: props.observabilityConfigurationName,
traceConfiguration: props.vendor ? {
vendor: props.vendor,
} : undefined,
});There was a problem hiding this comment.
Thanks.
I fixed it, and I tried to deploy it.
An Observability Configuration without TraceConfiguration could be deployed.
% aws apprunner describe-observability-configuration --observability-configuration-arn arn:aws:apprunner:us-east-1: 01234567890:observabilityconfiguration/my-observability-no-vendor/1/2bc8fefaddcc4b878c0dfe2598412555 --region us-east-1
{
"ObservabilityConfiguration": {
"ObservabilityConfigurationArn": "arn:aws:apprunner:us-east-1:01234567890:observabilityconfiguration/my-observability-no-vendor/1/2bc8fefaddcc4b878c0dfe2598412555",
"ObservabilityConfigurationName": "my-observability-no-vendor",
"ObservabilityConfigurationRevision": 1,
"Latest": false,
"Status": "ACTIVE",
"CreatedAt": "2024-06-02T09:46:36.997000+09:00"
}
}But the App Runner Service with it could not be deployed. It threw an error.

So, I added the above information to the documentation for the vendor property.
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
…uration.ts Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
…uration.ts Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
967bb81 to
8d7c747
Compare
8d7c747 to
b93cd9b
Compare
| physicalName: props.observabilityConfigurationName, | ||
| }); | ||
|
|
||
| if (props.observabilityConfigurationName !== undefined) { |
There was a problem hiding this comment.
Add a validation for observabilityConfigurationName and unit tests.
|
@lpizzinidev |
lpizzinidev
left a comment
There was a problem hiding this comment.
Thanks 👍 Left comments for some final adjustments
packages/@aws-cdk/aws-apprunner-alpha/lib/observability-configuration.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-apprunner-alpha/lib/observability-configuration.ts
Show resolved
Hide resolved
packages/@aws-cdk/aws-apprunner-alpha/lib/observability-configuration.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-apprunner-alpha/lib/observability-configuration.ts
Outdated
Show resolved
Hide resolved
…uration.ts Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
…uration.ts Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
…uration.ts Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
packages/@aws-cdk/aws-apprunner-alpha/lib/observability-configuration.ts
Outdated
Show resolved
Hide resolved
…uration.ts Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
packages/@aws-cdk/aws-apprunner-alpha/test/obserbability-configuration.test.ts
Show resolved
Hide resolved
GavinZZ
left a comment
There was a problem hiding this comment.
LGTM, thanks for contributing!
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
@mazyu36 Can you fix the failed unit test please when available? |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Issue # (if applicable)
Closes #22985 .
Reason for this change
At the moment, L2 Construct does not support a tracing setting for the AppRunner Service.
Description of changes
ObservabilityConfigurationClassobservabilityConfigurationproperty to theServiceClassDescription of how you validated changes
Add unit tests and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license