Skip to content

Commit 57f21a8

Browse files
committed
Add .sha256 file to the release note as an asset
2 parents a5bf4c7 + 87ec407 commit 57f21a8

39 files changed

+3617
-540
lines changed

.github/workflows/daily-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
id: high_scan
7474
uses: ./.github/actions/image_scan
7575
with:
76-
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.3.0"
76+
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.4.0"
7777
severity: 'CRITICAL,HIGH'
7878

7979
# TODO: Update image to public once available
@@ -82,7 +82,7 @@ jobs:
8282
id: low_scan
8383
uses: ./.github/actions/image_scan
8484
with:
85-
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.3.0"
85+
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.4.0"
8686
severity: 'MEDIUM,LOW,UNKNOWN'
8787

8888
- name: Configure AWS Credentials for emitting metrics

.github/workflows/release-build.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414
RELEASE_PRIVATE_REPOSITORY: 020628701572.dkr.ecr.us-west-2.amazonaws.com/adot-autoinstrumentation-node
1515
RELEASE_PRIVATE_REGISTRY: 020628701572.dkr.ecr.us-west-2.amazonaws.com
1616
PACKAGE_NAME: aws-distro-opentelemetry-node-autoinstrumentation
17+
ARTIFACT_NAME: aws-aws-distro-opentelemetry-node-autoinstrumentation-${{ github.event.inputs.version }}.tgz
1718

1819
permissions:
1920
id-token: write
@@ -86,6 +87,11 @@ jobs:
8687
tags: |
8788
${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
8889
90+
- name: Get SHA256 checksum of release artifact
91+
id: get_sha256
92+
run: |
93+
shasum -a 256 aws-distro-opentelemetry-node-autoinstrumentation/${{ env.ARTIFACT_NAME }} | sed "s|aws-distro-opentelemetry-node-autoinstrumentation/||" > ${{ env.ARTIFACT_NAME }}.sha256
94+
8995
# Publish to GitHub releases
9096
- name: Create GH release
9197
id: create_release
@@ -96,34 +102,14 @@ jobs:
96102
--title "Release v${{ github.event.inputs.version }}" \
97103
--draft \
98104
"v${{ github.event.inputs.version }}" \
99-
aws-distro-opentelemetry-node-autoinstrumentation/aws-aws-distro-opentelemetry-node-autoinstrumentation-${{ github.event.inputs.version }}.tgz
105+
aws-distro-opentelemetry-node-autoinstrumentation/${{ env.ARTIFACT_NAME }} \
106+
${{ env.ARTIFACT_NAME }}.sha256
100107
101108
# Publish to npm
102109
- name: Publish to npm
103110
env:
104111
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
105112
NPM_CONFIG_PROVENANCE: true
106113
run: npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes
107-
108-
- name: Get SHA256 checksum of wheel file
109-
id: get_sha256
110-
env:
111-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112-
run: |
113-
checksum=$(shasum -a 256 aws-distro-opentelemetry-node-autoinstrumentation/aws-aws-distro-opentelemetry-node-autoinstrumentation-${{ github.event.inputs.version }}.tgz | awk '{ print $1 }')
114-
echo "CHECKSUM=$checksum" >> $GITHUB_OUTPUT
115-
116-
- name: Append checksum and update version
117-
env:
118-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119-
run: |
120-
echo "aws-aws-distro-opentelemetry-node-autoinstrumentation-${{ github.event.inputs.version }}.tgz ${{ steps.get_sha256.outputs.CHECKSUM }}" >> checksum.txt
121-
echo "${{ github.event.inputs.version }}" > version.txt
122-
123-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
124-
git config --local user.name "GitHub Action Release Workflow"
125-
git add checksum.txt version.txt
126-
git commit -m "Update latest version and append checksum"
127-
git push
128114

129115

.github/workflows/release-lambda.yml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Setup Node
4040
uses: actions/setup-node@v4
4141
with:
42-
node-version: 20
42+
node-version: 22
4343
- name: NPM Clean Install
4444
# https://docs.npmjs.com/cli/v10/commands/npm-ci
4545
run: npm ci
@@ -100,7 +100,7 @@ jobs:
100100
aws lambda publish-layer-version \
101101
--layer-name ${{ env.LAYER_NAME }} \
102102
--content S3Bucket=${{ env.BUCKET_NAME }},S3Key=layer.zip \
103-
--compatible-runtimes nodejs18.x nodejs20.x \
103+
--compatible-runtimes nodejs18.x nodejs20.x nodejs22.x \
104104
--compatible-architectures "arm64" "x86_64" \
105105
--license-info "Apache-2.0" \
106106
--description "AWS Distro of OpenTelemetry Lambda Layer for NodeJs Runtime" \
@@ -186,16 +186,6 @@ jobs:
186186
with:
187187
name: layer.tf
188188
path: layer.tf
189-
- name: Commit changes
190-
env:
191-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
192-
run: |
193-
git config user.name "github-actions[bot]"
194-
git config user.email "github-actions[bot]@users.noreply.github.com"
195-
mv layer.tf lambda-layer/terraform/lambda/
196-
git add lambda-layer/terraform/lambda/layer.tf
197-
git commit -m "Update Lambda layer ARNs for releasing" || echo "No changes to commit"
198-
git push
199189
create-release:
200190
runs-on: ubuntu-latest
201191
needs: generate-release-note
@@ -207,23 +197,12 @@ jobs:
207197
echo "COMMIT_SHA=${GITHUB_SHA}" >> $GITHUB_ENV
208198
SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)
209199
echo "SHORT_SHA=${SHORT_SHA}" >> $GITHUB_ENV
210-
- name: Create Tag
211-
run: |
212-
git config user.name "github-actions[bot]"
213-
git config user.email "github-actions[bot]@users.noreply.github.com"
214-
TAG_NAME="lambda-${SHORT_SHA}"
215-
git tag -a "$TAG_NAME" -m "Release Lambda layer based on commit $TAG_NAME"
216-
git push origin "$TAG_NAME"
217-
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
218-
env:
219-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
220200
- name: Create Release
221201
id: create_release
222202
uses: actions/create-release@v1
223203
env:
224204
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
225205
with:
226-
tag_name: ${{ env.TAG_NAME }}
227206
release_name: "Release AWSOpenTelemetryDistroPython Lambda Layer"
228207
body_path: lambda-layer/terraform/lambda/layer.tf
229208
draft: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN npm install aws-aws-distro-opentelemetry-node-autoinstrumentation-$(node -p
1818
RUN npm install
1919

2020
# Stage 2: Build the cp-utility binary
21-
FROM public.ecr.aws/docker/library/rust:1.75 as builder
21+
FROM public.ecr.aws/docker/library/rust:1.81 as builder
2222

2323
WORKDIR /usr/src/cp-utility
2424
COPY ./tools/cp-utility .

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ This project ensures compatibility with the following supported NodeJS versions:
4444
### Note on Amazon CloudWatch Application Signals
4545

4646
[Amazon CloudWatch Application Signals](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Application-Monitoring-Sections.html) components are designed to seamlessly work with all library instrumentations offered by [OpenTelemetry NodeJS auto-instrumentation](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/metapackages/auto-instrumentations-node/README.md). While upstream OpenTelemetry NodeJS instrumentations are in beta, Application Signals components are stable, production ready and have also been tested for popular libraries/frameworks such as `ExpressJS, AWS SDK for JavaScript V3, and others`. We will prioritize backward compatibility for Application Signals components, striving to ensure that they remain functional even in the face of potential breaking changes introduced by OpenTelemetry upstream libraries. Please [raise an issue](https://github.com/aws-observability/aws-otel-js-instrumentation/blob/main/CONTRIBUTING.md#reporting-bugsfeature-requests) if you notice Application Signals doesn't work for a particular OpenTelemetry supported library.
47+
48+
## Checksum Verification
49+
Artifacts released will include a `.sha256` file for checksum verification starting from v0.4.0
50+
To verify, run the command `shasum -a 256 -c <artifact_name>.sha256`
51+
It should return the output `<artifact_name>: OK` if the validation is successful
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
build
22
node_modules
33
.eslintrc.js
4-
version.ts
4+
version.ts
5+
src/third-party

aws-distro-opentelemetry-node-autoinstrumentation/package.json

Lines changed: 15 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws/aws-distro-opentelemetry-node-autoinstrumentation",
3-
"version": "0.3.0-dev0",
3+
"version": "0.4.0-dev0",
44
"description": "This package provides Amazon Web Services distribution of the OpenTelemetry Node Instrumentation, which allows for auto-instrumentation of NodeJS applications.",
55
"author": {
66
"name": "Amazon Web Services",
@@ -31,9 +31,18 @@
3131
"prepublishOnly": "npm run compile",
3232
"tdd": "yarn test -- --watch-extensions ts --watch",
3333
"test": "nyc ts-mocha --timeout 10000 -p tsconfig.json --require '@opentelemetry/contrib-test-utils' 'test/**/*.ts'",
34-
"test:coverage": "nyc --all --check-coverage --functions 95 --lines 95 ts-mocha --timeout 10000 -p tsconfig.json --require '@opentelemetry/contrib-test-utils' 'test/**/*.ts'",
34+
"test:coverage": "nyc --check-coverage --functions 95 --lines 95 ts-mocha --timeout 10000 -p tsconfig.json --require '@opentelemetry/contrib-test-utils' 'test/**/*.ts'",
3535
"watch": "tsc -w"
3636
},
37+
"nyc": {
38+
"all": true,
39+
"include": [
40+
"src/**/*.ts"
41+
],
42+
"exclude": [
43+
"src/third-party/**/*.ts"
44+
]
45+
},
3746
"bugs": {
3847
"url": "https://github.com/aws-observability/aws-otel-js-instrumentation/issues"
3948
},
@@ -64,8 +73,11 @@
6473
"@aws-sdk/client-bedrock-agent-runtime": "3.632.0",
6574
"@aws-sdk/client-bedrock-runtime": "3.632.0",
6675
"@aws-sdk/client-kinesis": "3.632.0",
76+
"@aws-sdk/client-lambda": "^3.632.0",
6777
"@aws-sdk/client-s3": "3.632.0",
68-
"@aws-sdk/client-sqs": "3.632.0",
78+
"@aws-sdk/client-secrets-manager": "^3.632.0",
79+
"@aws-sdk/client-sfn": "^3.632.0",
80+
"@aws-sdk/client-sns": "^3.632.0",
6981
"@opentelemetry/contrib-test-utils": "0.41.0",
7082
"@types/mocha": "7.0.2",
7183
"@types/node": "18.6.5",
@@ -99,57 +111,6 @@
99111
"@opentelemetry/sdk-trace-base": "1.26.0",
100112
"@opentelemetry/semantic-conventions": "1.27.0"
101113
},
102-
"overrides": {
103-
"@opentelemetry/auto-instrumentations-node": {
104-
"@opentelemetry/instrumentation": "0.53.0",
105-
"@opentelemetry/instrumentation-amqplib": "0.42.0",
106-
"@opentelemetry/instrumentation-aws-lambda": "0.44.0",
107-
"@opentelemetry/instrumentation-aws-sdk": "0.44.0",
108-
"@opentelemetry/instrumentation-bunyan": "0.41.0",
109-
"@opentelemetry/instrumentation-cassandra-driver": "0.41.0",
110-
"@opentelemetry/instrumentation-connect": "0.39.0",
111-
"@opentelemetry/instrumentation-cucumber": "0.9.0",
112-
"@opentelemetry/instrumentation-dataloader": "0.12.0",
113-
"@opentelemetry/instrumentation-dns": "0.39.0",
114-
"@opentelemetry/instrumentation-express": "0.42.0",
115-
"@opentelemetry/instrumentation-fastify": "0.39.0",
116-
"@opentelemetry/instrumentation-fs": "0.15.0",
117-
"@opentelemetry/instrumentation-generic-pool": "0.39.0",
118-
"@opentelemetry/instrumentation-graphql": "0.43.0",
119-
"@opentelemetry/instrumentation-grpc": "0.53.0",
120-
"@opentelemetry/instrumentation-hapi": "0.41.0",
121-
"@opentelemetry/instrumentation-http": "0.53.0",
122-
"@opentelemetry/instrumentation-ioredis": "0.43.0",
123-
"@opentelemetry/instrumentation-kafkajs": "0.3.0",
124-
"@opentelemetry/instrumentation-knex": "0.40.0",
125-
"@opentelemetry/instrumentation-koa": "0.43.0",
126-
"@opentelemetry/instrumentation-lru-memoizer": "0.40.0",
127-
"@opentelemetry/instrumentation-memcached": "0.39.0",
128-
"@opentelemetry/instrumentation-mongodb": "0.47.0",
129-
"@opentelemetry/instrumentation-mongoose": "0.42.0",
130-
"@opentelemetry/instrumentation-mysql": "0.41.0",
131-
"@opentelemetry/instrumentation-mysql2": "0.41.0",
132-
"@opentelemetry/instrumentation-nestjs-core": "0.40.0",
133-
"@opentelemetry/instrumentation-net": "0.39.0",
134-
"@opentelemetry/instrumentation-pg": "0.44.0",
135-
"@opentelemetry/instrumentation-pino": "0.42.0",
136-
"@opentelemetry/instrumentation-redis": "0.42.0",
137-
"@opentelemetry/instrumentation-redis-4": "0.42.0",
138-
"@opentelemetry/instrumentation-restify": "0.41.0",
139-
"@opentelemetry/instrumentation-router": "0.40.0",
140-
"@opentelemetry/instrumentation-socket.io": "0.42.0",
141-
"@opentelemetry/instrumentation-tedious": "0.14.0",
142-
"@opentelemetry/instrumentation-undici": "0.6.0",
143-
"@opentelemetry/instrumentation-winston": "0.40.0",
144-
"@opentelemetry/resource-detector-alibaba-cloud": "0.29.1",
145-
"@opentelemetry/resource-detector-aws": "1.6.1",
146-
"@opentelemetry/resource-detector-azure": "0.2.11",
147-
"@opentelemetry/resource-detector-container": "0.4.1",
148-
"@opentelemetry/resource-detector-gcp": "0.29.11",
149-
"@opentelemetry/resources": "1.26.0",
150-
"@opentelemetry/sdk-node": "0.53.0"
151-
}
152-
},
153114
"files": [
154115
"build/src/**/*.js",
155116
"build/src/**/*.js.map",

aws-distro-opentelemetry-node-autoinstrumentation/src/aws-attribute-keys.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const AWS_ATTRIBUTE_KEYS: { [key: string]: string } = {
1414
AWS_REMOTE_RESOURCE_IDENTIFIER: 'aws.remote.resource.identifier',
1515
AWS_SDK_DESCENDANT: 'aws.sdk.descendant',
1616
AWS_CONSUMER_PARENT_SPAN_KIND: 'aws.consumer.parent.span.kind',
17+
AWS_CLOUDFORMATION_PRIMARY_IDENTIFIER: 'aws.remote.resource.cfn.primary.identifier',
1718

1819
AWS_REMOTE_TARGET: 'aws.remote.target',
1920
AWS_REMOTE_DB_USER: 'aws.remote.db.user',
@@ -35,4 +36,12 @@ export const AWS_ATTRIBUTE_KEYS: { [key: string]: string } = {
3536
AWS_BEDROCK_KNOWLEDGE_BASE_ID: 'aws.bedrock.knowledge_base.id',
3637
AWS_BEDROCK_AGENT_ID: 'aws.bedrock.agent.id',
3738
AWS_BEDROCK_GUARDRAIL_ID: 'aws.bedrock.guardrail.id',
39+
AWS_BEDROCK_GUARDRAIL_ARN: 'aws.bedrock.guardrail.arn',
40+
AWS_SNS_TOPIC_ARN: 'aws.sns.topic.arn',
41+
AWS_SECRETSMANAGER_SECRET_ARN: 'aws.secretsmanager.secret.arn',
42+
AWS_STEPFUNCTIONS_STATEMACHINE_ARN: 'aws.stepfunctions.state_machine.arn',
43+
AWS_STEPFUNCTIONS_ACTIVITY_ARN: 'aws.stepfunctions.activity.arn',
44+
AWS_LAMBDA_FUNCTION_NAME: 'aws.lambda.function.name',
45+
AWS_LAMBDA_RESOURCE_MAPPING_ID: 'aws.lambda.resource_mapping.id',
46+
AWS_LAMBDA_FUNCTION_ARN: 'aws.lambda.function.arn',
3847
};

0 commit comments

Comments
 (0)