Skip to content

fix: support Lambda instrumentation for contextManager: 'patch'; refactor Lambda tests #3305

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

Merged
merged 6 commits into from
May 3, 2023

Conversation

trentm
Copy link
Member

@trentm trentm commented May 1, 2023

Use explicit RunContext handling so even contextManager:'patch' works

Refactoring so we can drop AgentMock and TransactionMock under test/lambda/...

  • roll promises.test.js into the main test file
  • roll trace-context.test.js into the main lambda test file
  • roll transaction.test.js into main lambda test file
  • rename main lambda test file to lambda.test.js
  • drop now unused MockAgent

@trentm trentm self-assigned this May 1, 2023
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label May 1, 2023
@trentm trentm merged commit f6de93c into main May 3, 2023
@trentm trentm deleted the trentm/refactor-agentmock branch May 3, 2023 20:52
v1v added a commit to v1v/apm-agent-nodejs that referenced this pull request May 8, 2023
…re/support-specific-modules

* 'main' of github.com:elastic/apm-agent-nodejs: (54 commits)
  chore: fix dev-utils/ci-tav-slow-jobs.sh (elastic#3319)
  test: reduce TAV test matrix for slowest jobs (elastic#3321)
  chore: sync package-lock so 'npm ci' can work (elastic#3318)
  docs: document `useElasticTraceparentHeader` config var (elastic#3316)
  chore, test: test driver improvements (elastic#3293)
  test: drop node 14 from RC tests now that it is EOL (elastic#3315)
  test: fix running fastify.test.js with node v8 (elastic#3317)
  feat: add @apollo/server@4 support (elastic#3203)
  chore: update nvm (elastic#3309)
  tests: stop testing 'express-graphql' instrumentation (elastic#3304)
  chore: fix bitrot.js dev util for recent changes (elastic#3308)
  test: restore testing of Azure Functions on node >=18.x (elastic#3307)
  fix: support Lambda instrumentation for `contextManager: 'patch'`; refactor Lambda tests (elastic#3305)
  test: fix fastify TAV test failures (elastic#3314)
  test: fix @aws-sdk/client-s3 TAV test failures (elastic#3312)
  feat: add instrumentation for aws-sdk S3 client (elastic#3287)
  feat(fastify): add captureBody support (elastic#2681)
  feat: mysql2@3 support (elastic#3301)
  chore(deps): bump @opentelemetry/exporter-prometheus from 0.37.0 to 0.38.0 in /test/opentelemetry-metrics/fixtures (elastic#3295)
  chore(deps-dev): bump fastify from 4.16.3 to 4.17.0 (elastic#3296)
  ...
trentm added a commit that referenced this pull request May 16, 2023
…factor Lambda tests (#3305)

Changes in #3285 broke Lambda instrumentation if the deprecated
`contextManager:'patch' config var was used. This restores support for that, FWIW.

Also, refactoring so we can drop AgentMock and TransactionMock under 
test/lambda/... to simplify:
- roll promises.test.js into the main test file
- roll trace-context.test.js into the main lambda test file
- roll transaction.test.js into main lambda test file
- rename main lambda test file to lambda.test.js
- drop now unused MockAgent
PeterEinberger pushed a commit to fpm-git/apm-agent-nodejs that referenced this pull request Aug 20, 2024
…factor Lambda tests (elastic#3305)

Changes in elastic#3285 broke Lambda instrumentation if the deprecated
`contextManager:'patch' config var was used. This restores support for that, FWIW.

Also, refactoring so we can drop AgentMock and TransactionMock under 
test/lambda/... to simplify:
- roll promises.test.js into the main test file
- roll trace-context.test.js into the main lambda test file
- roll transaction.test.js into main lambda test file
- rename main lambda test file to lambda.test.js
- drop now unused MockAgent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant