Skip to content
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

fix: Update aws-lambda-instrumentation to SDK v0.25.0 #660

Merged
merged 6 commits into from
Sep 22, 2021
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install --save @opentelemetry/instrumentation-aws-lambda
Create a file to initialize the instrumentation, such as `lambda-wrapper.js`.

```js
const { NodeTracerProvider } = require('@opentelemetry/node');
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { AwsLambdaInstrumentation } = require('@opentelemetry/instrumentation-aws-lambda');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
},
"devDependencies": {
"@opentelemetry/api": "1.0.2",
"@opentelemetry/core": "0.24.0",
"@opentelemetry/node": "0.24.0",
"@opentelemetry/tracing": "^0.24.0",
"@opentelemetry/core": "0.25.0",
"@opentelemetry/sdk-trace-base": "^0.25.0",
"@opentelemetry/sdk-trace-node": "0.25.0",
"@types/mocha": "7.0.2",
"@types/node": "14.17.9",
"codecov": "3.8.3",
Expand All @@ -61,9 +61,9 @@
"typescript": "4.3.5"
},
"dependencies": {
"@opentelemetry/instrumentation": "^0.24.0",
"@opentelemetry/propagator-aws-xray": "^0.25.0",
"@opentelemetry/resources": "^0.24.0",
"@opentelemetry/instrumentation": "^0.25.0",
"@opentelemetry/propagator-aws-xray": "^0.24.0",
"@opentelemetry/resources": "^0.25.0",
"@opentelemetry/semantic-conventions": "^0.24.0",
"@types/aws-lambda": "8.10.81"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import { AwsLambdaInstrumentation } from '../../src';
import {
BatchSpanProcessor,
InMemorySpanExporter,
} from '@opentelemetry/tracing';
import { NodeTracerProvider } from '@opentelemetry/node';
} from '@opentelemetry/sdk-trace-base';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dependency is missing in package.json dependencies

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in devDependencies. Basically, if the tests passes, then we are good as the dependencies are good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not, but it has been added. It was a transitive dependency of something else which is why the tests were passing but it is good practice to declare all of your dependencies.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently, I'm blind. Thanks for sharing your perspective.

import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
import { Context } from 'aws-lambda';
import * as assert from 'assert';
import { ProxyTracerProvider, TracerProvider } from '@opentelemetry/api';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import {
BatchSpanProcessor,
InMemorySpanExporter,
ReadableSpan,
} from '@opentelemetry/tracing';
import { NodeTracerProvider } from '@opentelemetry/node';
} from '@opentelemetry/sdk-trace-base';
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
import { Context } from 'aws-lambda';
import * as assert from 'assert';
import {
Expand Down