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
feat: Added instrumentation for ElasticSearch #1785
feat: Added instrumentation for ElasticSearch #1785
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1785 +/- ##
==========================================
+ Coverage 96.84% 96.85% +0.01%
==========================================
Files 198 199 +1
Lines 38755 38901 +146
==========================================
+ Hits 37531 37677 +146
Misses 1224 1224
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good start but I think the instrumentation needs simplified a bit and the tests need to focus more on the different conditions of searching.
6e2a355
to
a854997
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall this is looking great. Just a few comments/suggestions around some code/tests/helpers etc
|
||
const suffix = actions[params.method] | ||
path.forEach((segment, idx) => { | ||
const prev = idx - 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry that someone could create an index as _search
or name an index with _
. In that case we're naming the collection any. It appears that's not allowed but we aren't handling that at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's explicitly prohibited for path index names to start with _
, -
, or +
, and for path parameters to include /
, among other punctuation characters. https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK--I've updated that to handle index creation separately.
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
…om connect to request, fixed calling the inContext method by calling with ctx instead of bind
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
…metric host name assertions Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
3afaa55
to
685e9ce
Compare
…ndex creation without manipulating index name. Signed-off-by: mrickard <maurice@mauricerickard.com>
Signed-off-by: mrickard <maurice@mauricerickard.com>
…ntained Signed-off-by: mrickard <maurice@mauricerickard.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice test additions
Description
Adds support for ElasticSearch instrumentation, for v8.0 and up
How to Test
npm run versioned elastic
npm run unit
to pick up unit tests around the query parser.Related Issues
Closes #1757
Closes NR-150258