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

Express plugin not working after v2.7.0 upgrade #3502

Open
susannakosic opened this issue Aug 4, 2023 · 0 comments
Open

Express plugin not working after v2.7.0 upgrade #3502

susannakosic opened this issue Aug 4, 2023 · 0 comments
Labels
bug Something isn't working integration-express

Comments

@susannakosic
Copy link

Hi, I am having a hard time trying to upgrade dd-trace to newer versions.
I explained the issue I m facing in here as it seems the same bug as #2124, although in this case plugins are enabled (default).

Expected behaviour
Express plugin loads and express.request object is available on traces.

Actual behaviour
Express plugin does not load. Only separate express.middleware objects can be seen on traces.

Steps to reproduce

  1. Clone dd-trace-upgrade-external repo.
  2. run yarn install, yarn start and curl --location 'http://localhost:4000/documents'
  3. Observe trace object contains express.request
  4. run yarn add dd-trace@2.7.0, or any other 2.x upgrade
  5. run yarn start and curl --location 'http://localhost:4000/documents'
  6. Observe trace object no longer contains express.request

Environment

  • Operation system: MacOs Ventura 13.4.1 (22F82)
  • Node.js version: lts/gallium
  • Tracer version: on upgrade 2.6.0>2.7.0
  • Relevant library versions: express@4.18.2, serverless@3.24.1

Package.json

{
  "name": "op-api",
  "version": "1.0.0",
  "license": "UNLICENSED",
  "main": "dist/app.js",
  "engines": {
    "node": "^16",
    "npm": "please-use-yarn",
    "yarn": "^1"
  },
  "scripts": {
    "start": "yarn start:local",
    "start:local": "concurrently --kill-others-on-fail yarn:build:watch yarn:start:sls:local",
    "start:sls": "sls offline start",
    "start:sls:local": "node node_modules/.bin/sls offline start --stage local",
    "start:debug:local": "concurrently \"yarn:build:watch\" \"SLS_DEBUG=1 node --inspect ./node_modules/.bin/sls offline start --stage local\"",
    "build": "tsc",
    "build:watch": "chokidar 'src/**/*.{ts,json}' -c 'yarn build' --initial",
    "build:check": "tsc --noEmit",
    "sls:print": "sls print",
    "sls:deploy": "sls deploy"
  },
  "dependencies": {
    "chokidar-cli": "^3.0.0",
    "dd-trace": "2.7.0",
    "debug": "^4.3.4",
    "express": "4.18.2",
    "lodash": "^4.17.21",
    "pino": "^6.7.0",
    "pino-debug": "^2.0.0",
    "pino-std-serializers": "^6.2.2",
    "serverless-http": "3.1.1"
  },
  "devDependencies": {
    "@types/aws-lambda": "^8.10.119",
    "@types/express": "^4.17.14",
    "@types/lodash": "^4.14.168",
    "@types/node": "^18.11.9",
    "@types/pino": "^6.3.3",
    "aws-lambda": "^1.0.7",
    "concurrently": "^7.0.0",
    "dependency-cruiser": "^13.1.1",
    "serverless": "^3.24.1",
    "serverless-offline": "^11.3.0",
    "serverless-plugin-datadog": "^5.1.0",
    "ts-node-dev": "^2.0.0",
    "typescript": "^4.8.4",
    "wait-on": "^5.3.0",
    "yaml-lint": "^1.6.0"
  },
  "resolutions": {}
}
@susannakosic susannakosic added the bug Something isn't working label Aug 4, 2023
@susannakosic susannakosic changed the title Express request plugin not working after v2.7.0 upgrade Express plugin not working after v2.7.0 upgrade Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integration-express
Projects
None yet
Development

No branches or pull requests

2 participants