opentelemetry-instrumentation-elasticsearch
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.4.4](https://github.com/aspecto-io/opentelemetry-ext-js/compare/opentelemetry-instrumentation-elasticsearch@0.4.3...opentelemetry-instrumentation-elasticsearch@0.4.4) (2021-06-02) | ||
**Note:** Version bump only for package opentelemetry-instrumentation-elasticsearch | ||
## [0.4.3](https://github.com/aspecto-io/opentelemetry-ext-js/compare/opentelemetry-instrumentation-elasticsearch@0.4.2...opentelemetry-instrumentation-elasticsearch@0.4.3) (2021-05-31) | ||
@@ -8,0 +16,0 @@ |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.4.3"; | ||
export declare const VERSION = "0.4.4"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.4.3'; | ||
exports.VERSION = '0.4.4'; | ||
//# sourceMappingURL=version.js.map |
@@ -9,4 +9,3 @@ "use strict"; | ||
const chai_1 = require("chai"); | ||
const tracing_1 = require("@opentelemetry/tracing"); | ||
const node_1 = require("@opentelemetry/node"); | ||
const opentelemetry_instrumentation_testing_utils_1 = require("opentelemetry-instrumentation-testing-utils"); | ||
const elasticsearch_1 = require("../src/elasticsearch"); | ||
@@ -19,7 +18,2 @@ const instrumentation = new elasticsearch_1.ElasticsearchInstrumentation(); | ||
describe('elasticsearch instrumentation', () => { | ||
const provider = new node_1.NodeTracerProvider(); | ||
const memoryExporter = new tracing_1.InMemorySpanExporter(); | ||
const spanProcessor = new tracing_1.SimpleSpanProcessor(memoryExporter); | ||
provider.addSpanProcessor(spanProcessor); | ||
instrumentation.setTracerProvider(provider); | ||
before(() => { | ||
@@ -31,5 +25,2 @@ instrumentation.enable(); | ||
}); | ||
beforeEach(() => { | ||
memoryExporter.reset(); | ||
}); | ||
it('should create valid span', async () => { | ||
@@ -49,3 +40,3 @@ esNock.get('/the-simpsons/_search').reply(200, {}); | ||
}); | ||
const spans = memoryExporter.getFinishedSpans(); | ||
const spans = opentelemetry_instrumentation_testing_utils_1.getTestSpans(); | ||
chai_1.expect(spans === null || spans === void 0 ? void 0 : spans.length).to.equal(2); | ||
@@ -74,3 +65,3 @@ chai_1.expect(spans[0].attributes).to.deep.equal({ | ||
await client.cluster.getSettings(); | ||
const spans = memoryExporter.getFinishedSpans(); | ||
const spans = opentelemetry_instrumentation_testing_utils_1.getTestSpans(); | ||
chai_1.expect(spans === null || spans === void 0 ? void 0 : spans.length).to.equal(1); | ||
@@ -91,3 +82,3 @@ chai_1.expect(spans[0].attributes).to.deep.equal({ | ||
instrumentation.enable(); | ||
const spans = memoryExporter.getFinishedSpans(); | ||
const spans = opentelemetry_instrumentation_testing_utils_1.getTestSpans(); | ||
chai_1.expect(spans === null || spans === void 0 ? void 0 : spans.length).to.equal(0); | ||
@@ -94,0 +85,0 @@ }); |
{ | ||
"name": "opentelemetry-instrumentation-elasticsearch", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "open telemetry instrumentation for the `elasticsearch` module", | ||
@@ -35,3 +35,4 @@ "keywords": [ | ||
"version": "yarn run version:update", | ||
"test": "mocha", | ||
"test": "mocha --require opentelemetry-instrumentation-testing-utils", | ||
"test:jaeger": "OTEL_EXPORTER_JAEGER_AGENT_HOST=localhost mocha --require opentelemetry-instrumentation-testing-utils", | ||
"test-all-versions": "tav", | ||
@@ -50,5 +51,2 @@ "test:ci": "yarn test-all-versions" | ||
"@elastic/elasticsearch": "^7.8.0", | ||
"@opentelemetry/api": "1.0.0-rc.0", | ||
"@opentelemetry/node": "^0.19.0", | ||
"@opentelemetry/tracing": "^0.19.0", | ||
"@types/chai": "^4.2.15", | ||
@@ -60,2 +58,4 @@ "@types/mocha": "^8.2.2", | ||
"nock": "^13.0.9", | ||
"opentelemetry-instrumentation-mocha": "^0.0.1-rc.0", | ||
"opentelemetry-instrumentation-testing-utils": "^0.4.1", | ||
"sinon": "^9.2.4", | ||
@@ -71,5 +71,8 @@ "test-all-versions": "^5.0.1", | ||
"spec": "test/**/*.spec.ts", | ||
"require": "ts-node/register" | ||
"require": [ | ||
"ts-node/register", | ||
"opentelemetry-instrumentation-mocha" | ||
] | ||
}, | ||
"gitHead": "0ffb67e586f78c6b091b3af5fad8656fde819202" | ||
"gitHead": "909b2e07091c7a7e88e29438f936bb30b6416c1f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13
91003
597