Skip to content

Commit

Permalink
shallow copy elastic.Client options because elastic/elasticsearch-js#33
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Hine authored and Paul Hine committed Apr 24, 2018
1 parent 98cb327 commit 507b4a4
Show file tree
Hide file tree
Showing 3 changed files with 1,297 additions and 56 deletions.
3 changes: 2 additions & 1 deletion packages/tracer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"fast-async": "^6.2.2",
"flow-bin": "^0.64.0",
"jest": "^20.0.4",
"prettier": "^1.5.2"
"prettier": "^1.5.2",
"webpack-cli": "^2.0.15"
},
"dependencies": {
"deepmerge": "^2.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/tracer/src/tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ export function logEntry({
const _options = options
? deepmerge(defaultOptions, options)
: defaultOptions;
const elasticClient = new elastic.Client(_options.elasticClient);
const elasticClient = new elastic.Client({ ..._options.elasticClient });
elasticClient.create({
index: _options.elasticIndex,
type: 'graphql',
id: uuid(),
body: entry,
});
Expand Down
Loading

0 comments on commit 507b4a4

Please sign in to comment.