node-newrelic: Crash in elasticsearch instrumentation with null body.
Description
error.stack: "TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at Transport.queryParser (/mnt/ramdisk/ecom-api/node_modules/newrelic/lib/instrumentation/@elastic/elasticsearch.js:58:49)
at DatastoreShim.parseQuery (/mnt/ramdisk/ecom-api/node_modules/newrelic/lib/shim/datastore-shim.js:456:35)
at Transport.queryRecord (/mnt/ramdisk/ecom-api/node_modules/newrelic/lib/shim/datastore-shim.js:670:25)
at Transport.wrapper (/mnt/ramdisk/ecom-api/node_modules/newrelic/lib/shim/shim.js:850:33)
at IndicesApi.indicesExistsApi [as exists] (/mnt/ramdisk/ecom-api/node_modules/@elastic/elasticsearch/api/api/indices.js:361:25)
Expected Behavior
No error.
Steps to Reproduce
Calling indicesExistsApi in @elastic/elasticsearch
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Reactions: 2
- Comments: 19 (9 by maintainers)
Commits related to this issue
- feat: Added instrumentation for ElasticSearch (#1785) — committed to newrelic/node-newrelic by mrickard 9 months ago
Hi @mrickard
I’ve tried to upgrade NewRelic from v11.1.0 to v11.5.0, but I’m still getting errors related to ElasticSearch.
We’re using
elasticsearchv7.13.0, here is the stack trace:Would you be able to help with this? I’m happy to create a new issues if you prefer.
@villelahdenvuo This has been released with agent version 11.3.0. Thank you for the report!
@villelahdenvuo Thank you! We’re preparing to ship the release early next week.
@mrickard Luckily it got caught in our E2E tests. 😄