Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
fixed tracing test (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmineiro authored and vigneshshanmugam committed Jun 18, 2018
1 parent 17ca956 commit 571b6d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module.exports = class Fragment extends EventEmitter {
const span = tracer.startSpan('fetch-fragment', spanOptions);
span.addTags({
[Tags.SPAN_KIND]: Tags.SPAN_KIND_RPC_CLIENT,
url: url,
[Tags.HTTP_URL]: url,
id: this.attributes.id || 'unnamed',
fallback: isFallback,
primary: this.attributes.primary,
Expand Down
4 changes: 2 additions & 2 deletions tests/tailor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { TEMPLATE_NOT_FOUND } = require('../lib/fetch-template');
const Tailor = require('../index');
const processTemplate = require('../lib/process-template');
const PIPE_DEFINITION = readFileSync(resolve(__dirname, '../src/pipe.min.js'));
const { MockTracer } = require('opentracing');
const { Tags, MockTracer } = require('opentracing');

//Custom mock tracer for Unit tests
class CustomTracer extends MockTracer {
Expand Down Expand Up @@ -1394,7 +1394,7 @@ describe('Tailor', () => {
const { tags } = traceResults();
assert.deepEqual(tags[1], {
'span.kind': 'client',
url: 'https://fragment/1',
[Tags.HTTP_URL]: 'https://fragment/1',
id: 'test',
fallback: false,
primary: false,
Expand Down

0 comments on commit 571b6d5

Please sign in to comment.