Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
try to upgrade otel versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Motti Bechhofer committed May 15, 2024
1 parent 3be217b commit 685663d
Show file tree
Hide file tree
Showing 21 changed files with 89 additions and 91 deletions.
8 changes: 4 additions & 4 deletions detectors/node/resource-detector-deployment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/resources": "~1.17.1",
"@opentelemetry/semantic-conventions": "^1.17.1",
"@opentelemetry/resources": "~1.24.1",
"@opentelemetry/semantic-conventions": "^1.24.1",
"opentelemetry-resource-detector-sync-api": "^0.29.0"
},
"devDependencies": {
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/api": "^1.8.0",
"@types/mocha": "^8.2.2",
"expect": "^26.6.2",
"mocha": "^8.4.0",
Expand Down
8 changes: 4 additions & 4 deletions detectors/node/resource-detector-git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/resources": "~1.17.1",
"@opentelemetry/semantic-conventions": "^1.17.1",
"@opentelemetry/resources": "~1.24.1",
"@opentelemetry/semantic-conventions": "^1.24.1",
"opentelemetry-resource-detector-sync-api": "^0.29.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/api": "^1.8.0",
"@types/mocha": "^8.2.2",
"@types/node": "^14.0.0",
"expect": "^26.6.2",
Expand Down
8 changes: 4 additions & 4 deletions detectors/node/resource-detector-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/resources": "~1.17.1",
"@opentelemetry/semantic-conventions": "^1.17.1",
"@opentelemetry/resources": "~1.24.1",
"@opentelemetry/semantic-conventions": "^1.24.1",
"opentelemetry-resource-detector-sync-api": "^0.29.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/api": "^1.8.0",
"@types/mocha": "^8.2.2",
"expect": "^26.6.2",
"mocha": "^8.4.0",
Expand Down
4 changes: 2 additions & 2 deletions detectors/resource-detector-sync-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/resources": "~1.17.1"
},
"devDependencies": {
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/api": "^1.8.0",
"ts-node": "^9.1.1",
"typescript": "4.3.4"
}
Expand Down
10 changes: 5 additions & 5 deletions packages/instrumentation-elasticsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/core": "^1.17.1",
"@opentelemetry/instrumentation": "^0.44.0",
"@opentelemetry/semantic-conventions": "^1.17.1"
"@opentelemetry/core": "^1.24.1",
"@opentelemetry/instrumentation": "^0.51.1",
"@opentelemetry/semantic-conventions": "^1.24.1"
},
"devDependencies": {
"@elastic/elasticsearch": "^7.8.0",
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/contrib-test-utils": "^0.34.2",
"@types/chai": "^4.2.15",
"@types/mocha": "^8.2.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/instrumentation-elasticsearch/src/elasticsearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from './utils';
import { ELASTICSEARCH_API_FILES } from './helpers';

export class ElasticsearchInstrumentation extends InstrumentationBase<typeof elasticsearch> {
export class ElasticsearchInstrumentation extends InstrumentationBase {
static readonly component = '@elastic/elasticsearch';

protected override _config: ElasticsearchInstrumentationConfig;
Expand All @@ -36,18 +36,18 @@ export class ElasticsearchInstrumentation extends InstrumentationBase<typeof ela
this._config = Object.assign({}, config);
}

protected init(): InstrumentationModuleDefinition<typeof elasticsearch> {
protected init(): InstrumentationModuleDefinition {
const apiModuleFiles = ELASTICSEARCH_API_FILES.map(
({ path, operationClassName }) =>
new InstrumentationNodeModuleFile<any>(
new InstrumentationNodeModuleFile(
`@elastic/elasticsearch/api/${path}`,
['>=5 <8'],
this.patch.bind(this, operationClassName),
this.unpatch.bind(this)
)
);

const module = new InstrumentationNodeModuleDefinition<typeof elasticsearch>(
const module = new InstrumentationNodeModuleDefinition(
ElasticsearchInstrumentation.component,
['*'],
undefined,
Expand Down
12 changes: 6 additions & 6 deletions packages/instrumentation-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@
"access": "public"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/core": "^1.17.1",
"@opentelemetry/instrumentation": "^0.44.0",
"@opentelemetry/semantic-conventions": "^1.17.1",
"@opentelemetry/core": "^1.24.1",
"@opentelemetry/instrumentation": "^0.51.1",
"@opentelemetry/semantic-conventions": "^1.24.1",
"parseurl": "~1.3.3",
"path-to-regexp": "0.1.7"
},
"devDependencies": {
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/contrib-test-utils": "^0.34.2",
"@opentelemetry/instrumentation-http": "^0.44.0",
"@opentelemetry/sdk-trace-base": "^1.17.1",
"@opentelemetry/sdk-trace-base": "^1.24.1",
"@types/express": "4.17.8",
"@types/mocha": "^8.2.2",
"axios": "0.21.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/instrumentation-express/src/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { SemanticAttributes } from '@opentelemetry/semantic-conventions';

const originalLayerStore = Symbol('otel.express-plugins.orig-layer-export');

export class ExpressInstrumentation extends InstrumentationBase<typeof express> {
export class ExpressInstrumentation extends InstrumentationBase {
static readonly supportedVersions = ['^4.9.0'];
protected override _config: ExpressInstrumentationConfig;

Expand All @@ -47,15 +47,15 @@ export class ExpressInstrumentation extends InstrumentationBase<typeof express>
this._config = Object.assign({}, config);
}

protected init(): InstrumentationModuleDefinition<typeof express> {
const layerModule = new InstrumentationNodeModuleFile<ExpressLayer>(
protected init(): InstrumentationModuleDefinition {
const layerModule = new InstrumentationNodeModuleFile(
'express/lib/router/layer.js',
ExpressInstrumentation.supportedVersions,
this._patchExpressLayer.bind(this),
this._unpatchExpressLayer.bind(this)
);

const module = new InstrumentationNodeModuleDefinition<typeof express>(
const module = new InstrumentationNodeModuleDefinition(
'express',
ExpressInstrumentation.supportedVersions,
this.patch.bind(this),
Expand Down
10 changes: 5 additions & 5 deletions packages/instrumentation-kafkajs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/instrumentation": "^0.44.0",
"@opentelemetry/semantic-conventions": "^1.17.1"
"@opentelemetry/instrumentation": "^0.51.1",
"@opentelemetry/semantic-conventions": "^1.24.1"
},
"devDependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/contrib-test-utils": "^0.34.2",
"@opentelemetry/sdk-trace-base": "^1.17.1",
"@opentelemetry/sdk-trace-base": "^1.24.1",
"@types/mocha": "^8.2.2",
"expect": "^26.6.2",
"kafkajs": "^1.16.0",
Expand Down
8 changes: 3 additions & 5 deletions packages/instrumentation-kafkajs/src/kafkajs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
isWrapped,
} from '@opentelemetry/instrumentation';

export class KafkaJsInstrumentation extends InstrumentationBase<typeof kafkaJs> {
export class KafkaJsInstrumentation extends InstrumentationBase {
static readonly component = 'kafkajs';
protected override _config!: KafkaJsInstrumentationConfig;
private moduleVersion: string;
Expand All @@ -52,10 +52,8 @@ export class KafkaJsInstrumentation extends InstrumentationBase<typeof kafkaJs>
this._config = Object.assign({}, config);
}

protected init(): InstrumentationModuleDefinition<typeof kafkaJs> {
const module: InstrumentationModuleDefinition<typeof kafkaJs> = new InstrumentationNodeModuleDefinition<
typeof kafkaJs
>(KafkaJsInstrumentation.component, ['*'], this.patch.bind(this), this.unpatch.bind(this));
protected init(): InstrumentationModuleDefinition {
const module: InstrumentationModuleDefinition = new InstrumentationNodeModuleDefinition(KafkaJsInstrumentation.component, ['*'], this.patch.bind(this), this.unpatch.bind(this));
module.includePrerelease = true;
return module;
}
Expand Down
10 changes: 5 additions & 5 deletions packages/instrumentation-neo4j/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/instrumentation": "^0.44.0",
"@opentelemetry/semantic-conventions": "^1.17.1"
"@opentelemetry/instrumentation": "^0.51.1",
"@opentelemetry/semantic-conventions": "^1.24.1"
},
"devDependencies": {
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/contrib-test-utils": "^0.34.2",
"@opentelemetry/sdk-trace-base": "^1.17.1",
"@opentelemetry/sdk-trace-base": "^1.24.1",
"@types/mocha": "^8.2.2",
"expect": "^26.6.2",
"mocha": "^8.4.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/instrumentation-neo4j/src/neo4j.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { getAttributesFromNeo4jSession } from './utils';

type Neo4J = typeof neo4j;

export class Neo4jInstrumentation extends InstrumentationBase<Neo4J> {
export class Neo4jInstrumentation extends InstrumentationBase {
protected override _config!: Neo4jInstrumentationConfig;

constructor(config: Neo4jInstrumentationConfig = {}) {
Expand All @@ -25,25 +25,25 @@ export class Neo4jInstrumentation extends InstrumentationBase<Neo4J> {
this._config = config;
}

protected init(): InstrumentationModuleDefinition<Neo4J>[] {
protected init(): InstrumentationModuleDefinition[] {
return [
this.getModuleDefinition('neo4j-driver-core', ['>=4.3.0 <5']),
this.getModuleDefinition('neo4j-driver', ['>=4.0.0 <4.3.0']),
];
}

private getModuleDefinition(name: string, supportedVersions: string[]): InstrumentationNodeModuleDefinition<Neo4J> {
private getModuleDefinition(name: string, supportedVersions: string[]): InstrumentationNodeModuleDefinition {
const apiModuleFiles = ['session', 'transaction'].map(
(file) =>
new InstrumentationNodeModuleFile<neo4j.Session>(
new InstrumentationNodeModuleFile(
`${name}/lib/${file}.js`,
supportedVersions,
this.patchSessionOrTransaction.bind(this),
this.unpatchSessionOrTransaction.bind(this)
)
);

const module = new InstrumentationNodeModuleDefinition<Neo4J>(
const module = new InstrumentationNodeModuleDefinition(
name,
supportedVersions,
undefined,
Expand Down
12 changes: 6 additions & 6 deletions packages/instrumentation-node-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/contrib-test-utils": "^0.34.2",
"@opentelemetry/core": "^1.17.1",
"@opentelemetry/instrumentation": "^0.44.0",
"@opentelemetry/semantic-conventions": "^1.17.1"
"@opentelemetry/core": "^1.24.1",
"@opentelemetry/instrumentation": "^0.51.1",
"@opentelemetry/semantic-conventions": "^1.24.1"
},
"devDependencies": {
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/contrib-test-utils": "^0.34.2",
"@opentelemetry/sdk-trace-base": "^1.17.1",
"@opentelemetry/sdk-trace-base": "^1.24.1",
"@types/mocha": "^8.2.2",
"expect": "^26.6.2",
"mocha": "^8.4.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/instrumentation-node-cache/src/node-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { SemanticAttributes } from '@opentelemetry/semantic-conventions';

type NodeCacheType = typeof NodeCache;

export class NodeCacheInstrumentation extends InstrumentationBase<NodeCacheType> {
export class NodeCacheInstrumentation extends InstrumentationBase {
constructor(protected override _config: NodeCacheInstrumentationConfig = {}) {
super('opentelemetry-instrumentation-node-cache', VERSION, _config);
}
Expand All @@ -21,8 +21,8 @@ export class NodeCacheInstrumentation extends InstrumentationBase<NodeCacheType>
this._config = config;
}

protected init(): InstrumentationModuleDefinition<NodeCacheType> {
const module = new InstrumentationNodeModuleDefinition<NodeCacheType>(
protected init(): InstrumentationModuleDefinition{
const module = new InstrumentationNodeModuleDefinition(
'node-cache',
['>=5.0.0'],
this.patch.bind(this)
Expand Down
12 changes: 6 additions & 6 deletions packages/instrumentation-sequelize/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
"url": "https://github.com/aspecto-io/opentelemetry-ext-js/issues"
},
"peerDependencies": {
"@opentelemetry/api": "^1.6.0"
"@opentelemetry/api": "^1.8.0"
},
"dependencies": {
"@opentelemetry/core": "^1.17.1",
"@opentelemetry/instrumentation": "^0.44.0",
"@opentelemetry/semantic-conventions": "^1.17.1"
"@opentelemetry/core": "^1.24.1",
"@opentelemetry/instrumentation": "^0.51.1",
"@opentelemetry/semantic-conventions": "^1.24.1"
},
"devDependencies": {
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/contrib-test-utils": "^0.34.2",
"@opentelemetry/sdk-trace-base": "^1.17.1",
"@opentelemetry/sdk-trace-base": "^1.24.1",
"@types/mocha": "^8.2.2",
"expect": "^26.6.2",
"mocha": "^8.4.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/instrumentation-sequelize/src/sequelize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
safeExecuteInTheMiddle,
} from '@opentelemetry/instrumentation';

export class SequelizeInstrumentation extends InstrumentationBase<typeof sequelize> {
export class SequelizeInstrumentation extends InstrumentationBase {
static readonly component = 'sequelize';
protected override _config!: SequelizeInstrumentationConfig;
private moduleVersion: string;
Expand All @@ -27,15 +27,15 @@ export class SequelizeInstrumentation extends InstrumentationBase<typeof sequeli
this._config = Object.assign({}, config);
}

protected init(): InstrumentationModuleDefinition<typeof sequelize> {
const connectionManagerInstrumentation = new InstrumentationNodeModuleFile<any>(
protected init(): InstrumentationModuleDefinition {
const connectionManagerInstrumentation = new InstrumentationNodeModuleFile(
'sequelize/lib/dialects/abstract/connection-manager.js',
['*'],
this.patchConnectionManager.bind(this),
this.unpatchConnectionManager.bind(this)
);

const module = new InstrumentationNodeModuleDefinition<typeof sequelize>(
const module = new InstrumentationNodeModuleDefinition(
SequelizeInstrumentation.component,
['*'],
this.patch.bind(this),
Expand Down
Loading

0 comments on commit 685663d

Please sign in to comment.