Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: move to otel 0.15.0
  • Loading branch information
Flarna committed Jan 21, 2021
commit 1989590feb0d5e05a0fd31d8fa7eac5abb44aa0b
12 changes: 6 additions & 6 deletions plugins/node/opentelemetry-instrumentation-dns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"access": "public"
},
"devDependencies": {
"@opentelemetry/core": "^0.14.0",
"@opentelemetry/node": "^0.14.0",
"@opentelemetry/tracing": "^0.14.0",
"@opentelemetry/core": "^0.15.0",
"@opentelemetry/node": "^0.15.0",
"@opentelemetry/tracing": "^0.15.0",
"@types/mocha": "7.0.2",
"@types/node": "14.0.27",
"@types/semver": "7.3.1",
Expand All @@ -62,9 +62,9 @@
"typescript": "3.9.7"
},
"dependencies": {
"@opentelemetry/api": "^0.14.0",
"@opentelemetry/instrumentation": "^0.14.0",
"@opentelemetry/semantic-conventions": "^0.14.0",
"@opentelemetry/api": "^0.15.0",
"@opentelemetry/instrumentation": "^0.15.0",
"@opentelemetry/semantic-conventions": "^0.15.0",
"semver": "^7.3.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
* limitations under the License.
*/

import { context } from '@opentelemetry/api';
import {
InMemorySpanExporter,
SimpleSpanProcessor,
} from '@opentelemetry/tracing';
import * as assert from 'assert';
import { NodeTracerProvider } from '@opentelemetry/node';
import { DnsInstrumentation } from '../../src/dns';
import * as sinon from 'sinon';
import * as Sinon from 'sinon';
import * as dns from 'dns';

const memoryExporter = new InMemorySpanExporter();
Expand All @@ -40,12 +41,12 @@ describe('DnsInstrumentation', () => {
});

beforeEach(() => {
tracer.startSpan = sinon.spy();
tracer.withSpan = sinon.spy();
Sinon.spy(tracer, 'startSpan');
Sinon.spy(context, 'with');
});

afterEach(() => {
sinon.restore();
Sinon.restore();
});

describe('unpatch()', () => {
Expand All @@ -61,7 +62,7 @@ describe('DnsInstrumentation', () => {
assert.strictEqual(spans.length, 0);

assert.strictEqual(dns.lookup.__wrapped, undefined);
assert.strictEqual((tracer.withSpan as sinon.SinonSpy).called, false);
assert.strictEqual((context.with as sinon.SinonSpy).called, false);
done();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
* limitations under the License.
*/

import { NoopLogger } from '@opentelemetry/core';
import {
ROOT_CONTEXT,
SpanKind,
TraceFlags,
NoopLogger,
} from '@opentelemetry/api';
import { BasicTracerProvider, Span } from '@opentelemetry/tracing';
import { ROOT_CONTEXT, SpanKind, TraceFlags } from '@opentelemetry/api';
import * as assert from 'assert';
import * as sinon from 'sinon';
import { AttributeNames } from '../../src/enums/AttributeNames';
Expand Down