-
Notifications
You must be signed in to change notification settings - Fork 404
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
Crash in elasticsearch instrumentation with null body. #1809
Comments
Thank you for the report, @villelahdenvuo , and sorry for the trouble. We'll prioritize a fix for this. |
@mrickard Luckily it got caught in our E2E tests. 😄 |
@villelahdenvuo which version of |
@bizob2828 @elastic/elasticsearch@7.10.0 as we're stuck on ES7 and would need to migrate to AWS OpenSearch. |
@villelahdenvuo ok, I think that might be the issue. We only support 8.0.0+, but unfortunately we didn't lock down the instrumentation but we built it with v8.0.0+. We will talk with our product manager about if we will support pre 8.0.0 |
@bizob2828 Regardless I think it's a good practice to check for null when doing |
@villelahdenvuo for sure. we were just trying to reproduce with an integration test and could not based on your stack |
Btw I can upgrade to 7.17.13, I had misconfigured Dependabot to ignore minor updates. Edit: Actually 7.13.x is the last supported OSS version. |
@villelahdenvuo Thank you! We're preparing to ship the release early next week. |
@villelahdenvuo This has been released with agent version 11.3.0. Thank you for the report! |
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
Would you be able to help with this? I'm happy to create a new issues if you prefer. |
HI @bartosz347 ! I'm sorry to hear you're having trouble. We run tests on several versions*, including 7.13.0, and we're not seeing that error. Would you be able to provide code that reproduces this behavior?
|
@mrickard Here is a sample code that is failing when NewRelic ( await elasticClient.helpers.bulk({
datasource: [
{
amount: 123,
},
],
onDocument() {
return [
{
update: { _index: 'xxx', _id: 'yyyyyy' },
},
{ doc_as_upsert: true },
];
},
}); I'm running Elasticsearch locally with Docker |
@bartosz347 Thank you for the repro! Were you successfully using our instrumentation prior to v11.6.0 of the agent? |
@mrickard No, we first tried to upgrade to v11.2.1, but due to ElasticSearch errors we've reverted to v11.1.0. This week I tried to upgrade to v11.6.0. Some ES queries started to work but not all of them. |
@bartosz347 Would you be able to open this as a new issue? |
Done – #1908 |
Description
https://github.com/newrelic/node-newrelic/blob/main/lib/instrumentation/%40elastic/elasticsearch.js#L58
Expected Behavior
No error.
Steps to Reproduce
Calling
indicesExistsApi
in@elastic/elasticsearch
The text was updated successfully, but these errors were encountered: