Skip to content

docs(nodejs): improve nodejs doc and use node 22 for workflows #1694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
- uses: actions/cache@v4
with:
path: ~/.npm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-layer-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22

- name: Build
run: |
Expand All @@ -53,7 +53,7 @@ jobs:
with:
name: opentelemetry-nodejs-layer.zip
path: nodejs/packages/layer/build/opentelemetry-nodejs-layer.zip

- name: Add Binary to Release
run: |
gh release upload ${{github.ref_name}} nodejs/packages/layer/build/opentelemetry-nodejs-layer.zip
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ These 2 layers are meant to be used in conjunction to instrument your lambda fun

* **What exporters/receivers/processors are included from the OpenTelemetry Collector?**
> You can check out [the stripped-down collector's imports](https://github.com/open-telemetry/opentelemetry-lambda/blob/main/collector/lambdacomponents/default.go#L18) in this repository for a full list of currently included components.

> Self-built binaries of the collector have **experimental** support for a custom set of connectors/exporters/receivers/processors. For more information, see [(Experimental) Customized collector build](./collector/README.md#experimental-customized-collector-build)
* **Is the Lambda layer provided or do I need to build it and distribute it myself?**
> This repository provides pre-built Lambda layers, their ARNs are available in the [Releases](https://github.com/open-telemetry/opentelemetry-lambda/releases). You can also build the layers manually and publish them in your AWS account. This repo has files to facilitate doing that. More information is provided in [the Collector folder's README](collector/README.md).
Expand Down Expand Up @@ -100,10 +100,6 @@ The table below captures the state of various features and their levels of suppo
* `N/A` not applicable to the particular language
* blank cell means the status of the feature is not known.

The following are runtimes which are no longer or not yet supported by this repository:

* Node.js 12 - not [officially supported](https://github.com/open-telemetry/opentelemetry-js#supported-runtimes) by OpenTelemetry JS

[1]: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/faas-spans.md#general-attributes
[2]: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/faas-spans.md#incoming-invocations
[3]: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/faas-spans.md#outgoing-invocations
Expand Down
16 changes: 14 additions & 2 deletions nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ To use, add the layer to your function configuration and then set `AWS_LAMBDA_EX
[AWS SDK v2 instrumentation](https://github.com/aspecto-io/opentelemetry-ext-js/tree/master/packages/instrumentation-aws-sdk) is also
included and loaded automatically if you use the AWS SDK v2.

## Supported Runtimes

| Platform Version | Supported |
| ------------------- | --------------------------------------------- |
| `nodejs22.x` | :heavy_check_mark: |
| `nodejs20.x` | :heavy_check_mark: |
| `nodejs18.x` | :heavy_check_mark: |
| Older Node Versions | See [Node Support](#node-support) |

### Node Support

Only Node.js Active or Maintenance LTS versions are supported.

## Building

To build the layer and sample applications in this `nodejs` folder:
Expand All @@ -31,5 +44,4 @@ You'll find the generated layer zip file at `./packages/layer/build/layer.zip`.
Sample applications are provided to show usage of the above layer.

- Application using AWS SDK - shows using the wrapper with an application using AWS SDK without code change.
- [Using layer built from source](./integration-tests/aws-sdk)
- [WIP] [Using OTel Public Layer](./sample-apps/aws-sdk)
- [WIP] [Using OTel Public Layer](./sample-apps/aws-sdk)
Loading