-
Notifications
You must be signed in to change notification settings - Fork 39
feat: new elasticsearch instrumentation #70
Conversation
"@opentelemetry/api": "^0.17.0", | ||
"@opentelemetry/instrumentation": "^0.17.0", | ||
"@opentelemetry/semantic-conventions": "^0.17.0", | ||
"test-all-versions": "^5.0.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.
should be dev dependency
import { startSpan, onError, onResponse, defaultDbStatementSerializer, normalizeArguments } from './utils'; | ||
import { ELASTICSEARCH_API_FILES } from './helpers'; | ||
|
||
type Config = InstrumentationConfig & ElasticsearchInstrumentationConfig; |
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 actually changes this and used ElasticsearchInstrumentationConfig directly instead
import { Span } from '@opentelemetry/api'; | ||
import { InstrumentationConfig } from '@opentelemetry/instrumentation'; | ||
|
||
export interface SerializerPayload { |
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.
unused, copied from mongoose
aggregatePipeline?: any; | ||
} | ||
|
||
export type DbStatementSerializer = (params?: object, options?: object) => string; |
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.
could be nice to pass the operation as well, like in mongoose and redis
@@ -0,0 +1,8 @@ | |||
Copyright 2021 @ Aspecto |
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.
use apache license
"watch": "tsc -w", | ||
"version:update": "node ../../scripts/version-update.js", | ||
"version": "yarn run version:update", | ||
"test": "mocha" |
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.
shouldn't be invoked with tav
?
…to feat/esInstument
package.json
Outdated
@@ -3,6 +3,7 @@ | |||
"private": true, | |||
"scripts": { | |||
"test": "lerna run test", | |||
"test:ci": "yarn test", |
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.
lerna run test:ci
package.json
Outdated
@@ -2,7 +2,7 @@ | |||
"name": "root", | |||
"private": true, | |||
"scripts": { | |||
"test": "lerna run test", | |||
"test": "lerna run test:ci", |
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.
should be lerna run test
and add another one called "test:ci": "lerna run test:ci"
No description provided.