New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

opentelemetry-instrumentation-elasticsearch

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opentelemetry-instrumentation-elasticsearch - npm Package Compare versions

Comparing version 0.0.0-2021-05-31--14-38 to 0.0.0-2021-06-07--07-42

8

CHANGELOG.md

@@ -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 @@

5

dist/src/elasticsearch.js

@@ -5,2 +5,3 @@ "use strict";

const api_1 = require("@opentelemetry/api");
const core_1 = require("@opentelemetry/core");
const instrumentation_1 = require("@opentelemetry/instrumentation");

@@ -112,6 +113,6 @@ const version_1 = require("./version");

if ((_a = this._config) === null || _a === void 0 ? void 0 : _a.suppressInternalInstrumentation) {
return api_1.context.with(api_1.suppressInstrumentation(api_1.context.active()), originalFunction);
return api_1.context.with(core_1.suppressTracing(api_1.context.active()), originalFunction);
}
else {
const activeContextWithSpan = api_1.setSpan(api_1.context.active(), span);
const activeContextWithSpan = api_1.trace.setSpan(api_1.context.active(), span);
return api_1.context.with(activeContextWithSpan, originalFunction);

@@ -118,0 +119,0 @@ }

2

dist/src/version.d.ts

@@ -1,2 +0,2 @@

export declare const VERSION = "0.0.0-2021-05-31--14-38";
export declare const VERSION = "0.0.0-2021-06-07--07-42";
//# sourceMappingURL=version.d.ts.map

@@ -5,3 +5,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.0.0-2021-05-31--14-38';
exports.VERSION = '0.0.0-2021-06-07--07-42';
//# 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 @@ });

@@ -160,2 +160,3 @@ "use strict";

startSpan: (name, options, context) => { },
startActiveSpan: () => { },
};

@@ -162,0 +163,0 @@ it('should start span with client kind', () => {

{
"name": "opentelemetry-instrumentation-elasticsearch",
"version": "0.0.0-2021-05-31--14-38",
"version": "0.0.0-2021-06-07--07-42",
"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",

@@ -44,11 +45,9 @@ "test:ci": "yarn test-all-versions"

"dependencies": {
"@opentelemetry/api": "^1.0.0-rc.0",
"@opentelemetry/instrumentation": "^0.19.0",
"@opentelemetry/semantic-conventions": "^0.19.0"
"@opentelemetry/api": "^0.20.0",
"@opentelemetry/core": "^0.20.0",
"@opentelemetry/instrumentation": "^0.20.0",
"@opentelemetry/semantic-conventions": "^0.20.0"
},
"devDependencies": {
"@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 +59,4 @@ "@types/mocha": "^8.2.2",

"nock": "^13.0.9",
"opentelemetry-instrumentation-mocha": "^0.0.1-rc.0",
"opentelemetry-instrumentation-testing-utils": "^0.0.0-2021-06-07--07-42",
"sinon": "^9.2.4",

@@ -71,5 +72,8 @@ "test-all-versions": "^5.0.1",

"spec": "test/**/*.spec.ts",
"require": "ts-node/register"
"require": [
"ts-node/register",
"opentelemetry-instrumentation-mocha"
]
},
"gitHead": "bd5bce12191c8173f30d62733cb45d2dc0feb610"
"gitHead": "bb0e4af3e4a101755c22fdb692be07a6ddeef51d"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc