diff --git a/.nycrc b/.nycrc
index 320e2271d6..97b3b9a0df 100644
--- a/.nycrc
+++ b/.nycrc
@@ -1,10 +1,6 @@
{
- "extension": [
- ".ts"
- ],
- "include": [
- "src/**"
- ],
+ "extension": [".ts"],
+ "include": ["src/**"],
"reporter": ["text", "json"],
"exclude": [
"**/*.d.ts",
diff --git a/examples/react-load/preact/.babelrc b/examples/react-load/preact/.babelrc
index 156eaae3d9..54b99533f1 100644
--- a/examples/react-load/preact/.babelrc
+++ b/examples/react-load/preact/.babelrc
@@ -1,9 +1,7 @@
{
"env": {
"test": {
- "presets": [
- ["preact-cli/babel", { "modules": "commonjs" }]
- ]
+ "presets": [["preact-cli/babel", { "modules": "commonjs" }]]
}
}
}
diff --git a/examples/react-load/preact/public/index.html b/examples/react-load/preact/public/index.html
index 4ad84066d0..47abed1456 100644
--- a/examples/react-load/preact/public/index.html
+++ b/examples/react-load/preact/public/index.html
@@ -1,10 +1,10 @@
-
+
-
+
React Load Example: Preact
-
+
diff --git a/examples/react-load/react/public/index.html b/examples/react-load/react/public/index.html
index ba71be6534..d127797370 100644
--- a/examples/react-load/react/public/index.html
+++ b/examples/react-load/react/public/index.html
@@ -1,11 +1,11 @@
-
+
-
+
React Load Example
-
+
diff --git a/examples/react-load/react/src/Content.jsx b/examples/react-load/react/src/Content.jsx
index 3ac0c945e0..a75aa27703 100644
--- a/examples/react-load/react/src/Content.jsx
+++ b/examples/react-load/react/src/Content.jsx
@@ -1,61 +1,55 @@
import React from 'react';
-import { Button} from 'reactstrap';
-import { BaseOpenTelemetryComponent } from '@opentelemetry/plugin-react-load'
+import { Button } from 'reactstrap';
+import { BaseOpenTelemetryComponent } from '@opentelemetry/plugin-react-load';
class Content extends BaseOpenTelemetryComponent {
- constructor(props){
- super(props)
+ constructor(props) {
+ super(props);
this.state = {
results: null,
- isLoading: false
- }
+ isLoading: false,
+ };
}
- componentDidMount(){
+ componentDidMount() {
// Example, do something here
}
buttonHandler() {
- this.setState({isLoading: true})
- const randomDelay = Math.random() * 10000;
+ this.setState({ isLoading: true });
+ const randomDelay = Math.random() * 10000;
setTimeout(() => {
this.setState({
isLoading: false,
- results: randomDelay
- })
- },
- randomDelay);
+ results: randomDelay,
+ });
+ }, randomDelay);
}
- renderResults(){
- if(this.state.isLoading){
+ renderResults() {
+ if (this.state.isLoading) {
return Loading results...
;
- }
- if (!this.state.results){
- return (
- No Results
- )
}
- return (
-
- Request was delayed {this.state.results} ms
-
- )
+ if (!this.state.results) {
+ return No Results
;
+ }
+ return Request was delayed {this.state.results} ms
;
}
render() {
return (
React Plugin Demo App
-
this.buttonHandler()} style={{marginBottom: '20px'}}>
+ this.buttonHandler()}
+ style={{ marginBottom: '20px' }}
+ >
Make Request
-
- {this.renderResults()}
-
+ {this.renderResults()}
- )
+ );
}
}
-
+
export default Content;
diff --git a/examples/react-load/react/src/Home.jsx b/examples/react-load/react/src/Home.jsx
index 7ac0b6d4bb..c3b2768c0e 100644
--- a/examples/react-load/react/src/Home.jsx
+++ b/examples/react-load/react/src/Home.jsx
@@ -6,12 +6,12 @@ class Home extends BaseOpenTelemetryComponent {
render() {
return (
-
- React Plugin Demo App
-
- Enter
+ React Plugin Demo App
+
+ Enter
+
- )
+ );
}
}
diff --git a/examples/react-load/react/src/index.jsx b/examples/react-load/react/src/index.jsx
index 08bd3690a5..ba40b6ce90 100644
--- a/examples/react-load/react/src/index.jsx
+++ b/examples/react-load/react/src/index.jsx
@@ -1,17 +1,18 @@
import React from 'react';
import ReactDOM from 'react-dom';
-import {BrowserRouter as Router, Route } from 'react-router-dom';
+import { BrowserRouter as Router, Route } from 'react-router-dom';
import Home from './Home';
import Content from './Content';
import Tracer from './web-tracer.js';
-Tracer('example-react-load')
+Tracer('example-react-load');
ReactDOM.render(
-
-
-
-
-
-
-,document.getElementById('root'));
+
+
+
+
+
+ ,
+ document.getElementById('root')
+);
diff --git a/examples/web/examples/document-load/index.html b/examples/web/examples/document-load/index.html
index b0362bc449..f9124eedab 100644
--- a/examples/web/examples/document-load/index.html
+++ b/examples/web/examples/document-load/index.html
@@ -1,12 +1,11 @@
-
+
+
+
+ Document Load Plugin Example
+
-
-
- Document Load Plugin Example
-
-
-
-
-
-
-
-
-
- Example of using Web Tracer with document load plugin with console exporter and collector exporter
-
-
- Test WebTracer with ZoneContextManager - async
+
-
+
+
+
+ Example of using Web Tracer with document load plugin with console exporter
+ and collector exporter
+
+
+ Test WebTracer with ZoneContextManager - async
+
diff --git a/examples/web/examples/meta/index.html b/examples/web/examples/meta/index.html
index 6862dcc0d7..6a33afc76b 100644
--- a/examples/web/examples/meta/index.html
+++ b/examples/web/examples/meta/index.html
@@ -1,12 +1,11 @@
-
+
+
+
+ User Interaction Example
+
-
-
- User Interaction Example
-
-
-
-
-
-
-
-
-
- Example of using Web Tracer with meta package and with console exporter and collector exporter
-
-
- Add button
-
-
+
-
+
+
+
+ Example of using Web Tracer with meta package and with console exporter and
+ collector exporter
+
+
+ Add button
+
+
+
diff --git a/examples/web/examples/user-interaction/index.html b/examples/web/examples/user-interaction/index.html
index 958fe75efc..3d749f4db9 100644
--- a/examples/web/examples/user-interaction/index.html
+++ b/examples/web/examples/user-interaction/index.html
@@ -1,12 +1,11 @@
-
+
+
+
+ User Interaction Example
+
-
-
- User Interaction Example
-
-
-
-
-
-
-
-
-
- Example of using Web Tracer with UserInteractionInstrumentation and XMLHttpRequestInstrumentation with console exporter and collector exporter
-
-
- Add button
-
-
+
-
+
+
+
+ Example of using Web Tracer with UserInteractionInstrumentation and
+ XMLHttpRequestInstrumentation with console exporter and collector exporter
+
+
+ Add button
+
+
+
diff --git a/karma.webpack.js b/karma.webpack.js
index 3ab9f82ad0..c6ed74a4a8 100644
--- a/karma.webpack.js
+++ b/karma.webpack.js
@@ -36,8 +36,8 @@ module.exports = {
// because the `util` package expects there to be a global variable named `process`.
// Thanks to https://stackoverflow.com/a/65018686/14239942
// NOTE: I wish there was a better way as this pollutes the tests with a defined 'process' global.
- process: 'process/browser.js'
- })
+ process: 'process/browser.js',
+ }),
],
module: {
rules: [
diff --git a/package.json b/package.json
index 37b0895e6a..461cfd3b88 100644
--- a/package.json
+++ b/package.json
@@ -25,11 +25,13 @@
"test-services:stop": "docker compose -f ./test/docker-compose.yaml down",
"test:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=./test/test-services.env npm test",
"test-all-versions:with-services-env": "cross-env NODE_OPTIONS='-r dotenv/config' DOTENV_CONFIG_PATH=./test/test-services.env npm run test-all-versions",
- "lint": "nx run-many -t lint && npm run lint:deps && npm run lint:readme && npm run lint:markdown && npm run lint:semconv-deps",
- "lint:fix": "nx run-many -t lint --fix && npm run lint:markdown:fix",
+ "lint": "nx run-many -t lint && npm run lint:prettier && npm run lint:deps && npm run lint:readme && npm run lint:markdown && npm run lint:semconv-deps",
+ "lint:fix": "nx run-many -t lint --fix && npm run lint:prettier:fix && npm run lint:markdown:fix",
"lint:deps": "npx --yes knip@5.33.3 --dependencies --production --tags=-knipignore",
"lint:markdown": "markdownlint-cli2 $(git ls-files '*.md')",
"lint:markdown:fix": "markdownlint-cli2 --fix $(git ls-files '*.md')",
+ "lint:prettier": "prettier --check .",
+ "lint:prettier:fix": "prettier --write .",
"lint:readme": "nx run-many -t lint:readme",
"lint:semconv-deps": "./scripts/lint-semconv-deps.mjs -x packages/contrib-test-utils/src/resource-assertions.ts"
},
diff --git a/packages/instrumentation-amqplib/src/amqplib.ts b/packages/instrumentation-amqplib/src/amqplib.ts
index d72d4c4e84..2dd36afe47 100644
--- a/packages/instrumentation-amqplib/src/amqplib.ts
+++ b/packages/instrumentation-amqplib/src/amqplib.ts
@@ -692,8 +692,8 @@ export class AmqplibInstrumentation extends InstrumentationBase {
- private declare _traceForceFlusher?: () => Promise;
- private declare _metricForceFlusher?: () => Promise;
+ declare private _traceForceFlusher?: () => Promise;
+ declare private _metricForceFlusher?: () => Promise;
constructor(config: AwsLambdaInstrumentationConfig = {}) {
super(PACKAGE_NAME, PACKAGE_VERSION, config);
@@ -337,7 +337,13 @@ export class AwsLambdaInstrumentation extends InstrumentationBase (original as (event: any, context: Context) => Promise | any).apply(this, [event, context]),
+ () =>
+ (
+ original as (
+ event: any,
+ context: Context
+ ) => Promise | any
+ ).apply(this, [event, context]),
error => {
if (error != null) {
// Exception thrown synchronously before resolving promise.
@@ -376,7 +382,10 @@ export class AwsLambdaInstrumentation extends InstrumentationBase {
// Promise-based handler only (Node.js 24+)
const maybePromise = safeExecuteInTheMiddle(
- () => (original as (event: any, context: Context) => Promise | any).apply(this, [event, context]),
+ () =>
+ (
+ original as (event: any, context: Context) => Promise | any
+ ).apply(this, [event, context]),
error => {
if (error != null) {
// Exception thrown synchronously before resolving promise.
diff --git a/packages/instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts b/packages/instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts
index a9bf01e89c..773af3d728 100644
--- a/packages/instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts
+++ b/packages/instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts
@@ -242,7 +242,10 @@ describe('lambda handler', () => {
it('should export a valid span', async () => {
initializeHandler('lambda-test/sync.handler');
- const result = await lambdaRequire('lambda-test/sync').handler('arg', ctx);
+ const result = await lambdaRequire('lambda-test/sync').handler(
+ 'arg',
+ ctx
+ );
assert.strictEqual(result, 'ok');
const spans = memoryExporter.getFinishedSpans();
const [span] = spans;
@@ -280,7 +283,10 @@ describe('lambda handler', () => {
initializeHandler('lambda-test/sync.handler');
- const result = await lambdaRequire('lambda-test/sync').handler('arg', ctx);
+ const result = await lambdaRequire('lambda-test/sync').handler(
+ 'arg',
+ ctx
+ );
assert.strictEqual(result, 'ok');
const spans = memoryExporter.getFinishedSpans();
const [span] = spans;
@@ -295,7 +301,10 @@ describe('lambda handler', () => {
lambdaStartTime: Date.now() - 2 * lambdaMaxInitInMilliseconds,
});
- const result = await lambdaRequire('lambda-test/sync').handler('arg', ctx);
+ const result = await lambdaRequire('lambda-test/sync').handler(
+ 'arg',
+ ctx
+ );
assert.strictEqual(result, 'ok');
const spans = memoryExporter.getFinishedSpans();
const [span] = spans;
@@ -359,7 +368,10 @@ describe('lambda handler', () => {
it('context should have parent trace', async () => {
initializeHandler('lambda-test/sync.context');
- const result = await lambdaRequire('lambda-test/sync').context('arg', ctx);
+ const result = await lambdaRequire('lambda-test/sync').context(
+ 'arg',
+ ctx
+ );
const spans = memoryExporter.getFinishedSpans();
const [span] = spans;
assert.strictEqual(span.spanContext().traceId, result);
@@ -368,7 +380,10 @@ describe('lambda handler', () => {
it('context should have parent trace', async () => {
initializeHandler('lambda-test/sync.context');
- const result = await lambdaRequire('lambda-test/sync').context('arg', ctx);
+ const result = await lambdaRequire('lambda-test/sync').context(
+ 'arg',
+ ctx
+ );
const spans = memoryExporter.getFinishedSpans();
const [span] = spans;
assert.strictEqual(span.spanContext().traceId, result);
@@ -669,7 +684,10 @@ describe('lambda handler', () => {
it('sync - success', async () => {
initializeHandler('lambda-test/sync.handler', config);
- const result = await lambdaRequire('lambda-test/sync').handler('arg', ctx);
+ const result = await lambdaRequire('lambda-test/sync').handler(
+ 'arg',
+ ctx
+ );
const [span] = memoryExporter.getFinishedSpans();
assert.strictEqual(span.attributes[RES_ATTR], result);
});
@@ -760,8 +778,8 @@ describe('lambda handler', () => {
assert.ok(
span.attributes[ATTR_URL_FULL] ===
'http://www.example.com:1234/lambda/test/path?key=value&key2=value2' ||
- span.attributes[ATTR_URL_FULL] ===
- 'http://www.example.com:1234/lambda/test/path?key2=value2&key=value'
+ span.attributes[ATTR_URL_FULL] ===
+ 'http://www.example.com:1234/lambda/test/path?key2=value2&key=value'
);
});
it('pulls url from api gateway http events', async () => {
diff --git a/packages/instrumentation-aws-lambda/test/lambda-test/commonjs.cjs b/packages/instrumentation-aws-lambda/test/lambda-test/commonjs.cjs
index 3fc61adccf..a14326637a 100644
--- a/packages/instrumentation-aws-lambda/test/lambda-test/commonjs.cjs
+++ b/packages/instrumentation-aws-lambda/test/lambda-test/commonjs.cjs
@@ -1,3 +1,3 @@
exports.handler = async function (event, context) {
- return "ok";
-};
\ No newline at end of file
+ return 'ok';
+};
diff --git a/packages/instrumentation-aws-sdk/src/aws-sdk.ts b/packages/instrumentation-aws-sdk/src/aws-sdk.ts
index 9d10fd6c6c..378c05db05 100644
--- a/packages/instrumentation-aws-sdk/src/aws-sdk.ts
+++ b/packages/instrumentation-aws-sdk/src/aws-sdk.ts
@@ -71,7 +71,7 @@ type V3PluginCommand = AwsV3Command & {
export class AwsInstrumentation extends InstrumentationBase {
static readonly component = 'aws-sdk';
// need declare since initialized in callbacks from super constructor
- private declare servicesExtensions: ServicesExtensions;
+ declare private servicesExtensions: ServicesExtensions;
private _semconvStability: SemconvStability;
diff --git a/packages/instrumentation-dns/src/internal-types.ts b/packages/instrumentation-dns/src/internal-types.ts
index 2a404e4326..df25f2c54f 100644
--- a/packages/instrumentation-dns/src/internal-types.ts
+++ b/packages/instrumentation-dns/src/internal-types.ts
@@ -49,7 +49,7 @@ export type LookupSimpleArgs = [number, LookupSimpleCallback];
export type LookupOneArgs = [dns.LookupOneOptions, LookupSimpleCallback];
export type LookupAllArgs = [
dns.LookupAllOptions,
- (err: NodeJS.ErrnoException | null, addresses: dns.LookupAddress[]) => void
+ (err: NodeJS.ErrnoException | null, addresses: dns.LookupAddress[]) => void,
];
export type LookupArgs = [
dns.LookupOptions,
@@ -57,7 +57,7 @@ export type LookupArgs = [
err: NodeJS.ErrnoException | null,
address: string | dns.LookupAddress[],
family: number
- ) => void
+ ) => void,
];
export type LookupArgSignature = LookupSimpleArgs &
LookupSimpleCallback &
diff --git a/packages/instrumentation-fs/src/instrumentation.ts b/packages/instrumentation-fs/src/instrumentation.ts
index 9976af4ba1..99cb60fdbb 100644
--- a/packages/instrumentation-fs/src/instrumentation.ts
+++ b/packages/instrumentation-fs/src/instrumentation.ts
@@ -47,7 +47,7 @@ type FSPromises = (typeof fs)['promises'];
* when patching the 1st-level.
*/
function patchedFunctionWithOriginalProperties<
- T extends (...args: any[]) => ReturnType
+ T extends (...args: any[]) => ReturnType,
>(patchedFunction: T, original: T): T {
return Object.assign(patchedFunction, original);
}
@@ -296,7 +296,7 @@ export class FsInstrumentation extends InstrumentationBase ReturnType
+ T extends (...args: any[]) => ReturnType,
>(functionName: 'exists', original: T): T {
const instrumentation = this;
const patchedFunction = function (this: any, ...args: any[]) {
diff --git a/packages/instrumentation-graphql/src/internal-types.ts b/packages/instrumentation-graphql/src/internal-types.ts
index a5e4a2df76..315b974c94 100644
--- a/packages/instrumentation-graphql/src/internal-types.ts
+++ b/packages/instrumentation-graphql/src/internal-types.ts
@@ -39,7 +39,7 @@ export type executeArgumentsArray = [
Maybe<{ [key: string]: any }>,
Maybe,
Maybe>,
- Maybe>
+ Maybe>,
];
export type executeFunctionWithArgs = (
diff --git a/packages/instrumentation-hapi/src/internal-types.ts b/packages/instrumentation-hapi/src/internal-types.ts
index 2c133199cb..2fd1ccc587 100644
--- a/packages/instrumentation-hapi/src/internal-types.ts
+++ b/packages/instrumentation-hapi/src/internal-types.ts
@@ -54,7 +54,7 @@ export type PatchableExtMethod = Hapi.Lifecycle.Method & {
export type ServerExtDirectInput = [
Hapi.ServerRequestExtType,
Hapi.Lifecycle.Method,
- (Hapi.ServerExtOptions | undefined)?
+ (Hapi.ServerExtOptions | undefined)?,
];
export const HapiLayerType = {
diff --git a/packages/instrumentation-ioredis/src/instrumentation.ts b/packages/instrumentation-ioredis/src/instrumentation.ts
index 175f418530..94c3b0e39e 100644
--- a/packages/instrumentation-ioredis/src/instrumentation.ts
+++ b/packages/instrumentation-ioredis/src/instrumentation.ts
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-import { diag, trace, context, SpanKind, type Attributes } from '@opentelemetry/api';
+import {
+ diag,
+ trace,
+ context,
+ SpanKind,
+ type Attributes,
+} from '@opentelemetry/api';
import {
InstrumentationBase,
InstrumentationNodeModuleDefinition,
@@ -188,7 +194,6 @@ export class IORedisInstrumentation extends InstrumentationBase {
Span,
string,
unknown,
- Buffer
+ Buffer,
];
assert.strictEqual(cmdName, 'set');
assert.strictEqual(response.toString(), 'OK');
@@ -1063,7 +1063,7 @@ describe('ioredis', () => {
try {
// Act
const tracer = provider.getTracer('ioredis-test');
- await tracer.startActiveSpan('parent', async (parentSpan) => {
+ await tracer.startActiveSpan('parent', async parentSpan => {
await client.set(testKeyName, 'aValue');
parentSpan.end();
});
@@ -1096,7 +1096,7 @@ describe('ioredis', () => {
try {
// Act
const tracer = provider.getTracer('ioredis-test');
- await tracer.startActiveSpan('parent', async (parentSpan) => {
+ await tracer.startActiveSpan('parent', async parentSpan => {
await client.set(testKeyName, 'aValue');
parentSpan.end();
});
diff --git a/packages/instrumentation-kafkajs/src/instrumentation.ts b/packages/instrumentation-kafkajs/src/instrumentation.ts
index f86c1215b0..30c36bbcac 100644
--- a/packages/instrumentation-kafkajs/src/instrumentation.ts
+++ b/packages/instrumentation-kafkajs/src/instrumentation.ts
@@ -163,10 +163,10 @@ const HISTOGRAM_BUCKET_BOUNDARIES = [
0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10,
];
export class KafkaJsInstrumentation extends InstrumentationBase {
- private declare _clientDuration: Histogram;
- private declare _sentMessages: Counter;
- private declare _consumedMessages: Counter;
- private declare _processDuration: Histogram;
+ declare private _clientDuration: Histogram;
+ declare private _sentMessages: Counter;
+ declare private _consumedMessages: Counter;
+ declare private _processDuration: Histogram;
constructor(config: KafkaJsInstrumentationConfig = {}) {
super(PACKAGE_NAME, PACKAGE_VERSION, config);
diff --git a/packages/instrumentation-kafkajs/test/utils.ts b/packages/instrumentation-kafkajs/test/utils.ts
index ba02018b18..2ac43094da 100644
--- a/packages/instrumentation-kafkajs/test/utils.ts
+++ b/packages/instrumentation-kafkajs/test/utils.ts
@@ -61,12 +61,15 @@ export function assertMetricCollection(
values.forEach(({ buckets }, i) => {
if (buckets) {
const { boundaries, counts } = match.dataPoints[i].value.buckets;
- const actualBuckets = counts.reduce((acc, n, j) => {
- if (n > 0) {
- acc[boundaries[j]] = n;
- }
- return acc;
- }, {} as Record);
+ const actualBuckets = counts.reduce(
+ (acc, n, j) => {
+ if (n > 0) {
+ acc[boundaries[j]] = n;
+ }
+ return acc;
+ },
+ {} as Record
+ );
assert.deepStrictEqual(actualBuckets, buckets);
}
});
diff --git a/packages/instrumentation-koa/src/types.ts b/packages/instrumentation-koa/src/types.ts
index 494141d0f3..9139258f34 100644
--- a/packages/instrumentation-koa/src/types.ts
+++ b/packages/instrumentation-koa/src/types.ts
@@ -55,7 +55,7 @@ export type KoaRequestInfo = {
*/
export interface KoaRequestCustomAttributeFunction<
KoaContextType = any,
- KoaMiddlewareType = any
+ KoaMiddlewareType = any,
> {
(span: Span, info: KoaRequestInfo): void;
}
@@ -65,7 +65,7 @@ export interface KoaRequestCustomAttributeFunction<
*/
export interface KoaInstrumentationConfig<
KoaContextType = any,
- KoaMiddlewareType = any
+ KoaMiddlewareType = any,
> extends InstrumentationConfig {
/** Ignore specific layers based on their type */
ignoreLayersType?: KoaLayerType[];
diff --git a/packages/instrumentation-memcached/src/utils.ts b/packages/instrumentation-memcached/src/utils.ts
index ec12c6e7b8..2894246ad3 100644
--- a/packages/instrumentation-memcached/src/utils.ts
+++ b/packages/instrumentation-memcached/src/utils.ts
@@ -15,10 +15,7 @@
*/
import type * as Memcached from 'memcached';
-import {
- ATTR_NET_PEER_NAME,
- ATTR_NET_PEER_PORT,
-} from './semconv';
+import { ATTR_NET_PEER_NAME, ATTR_NET_PEER_PORT } from './semconv';
import {
ATTR_SERVER_ADDRESS,
ATTR_SERVER_PORT,
diff --git a/packages/instrumentation-memcached/test/index.test.ts b/packages/instrumentation-memcached/test/index.test.ts
index 189bcabde4..a012e4b333 100644
--- a/packages/instrumentation-memcached/test/index.test.ts
+++ b/packages/instrumentation-memcached/test/index.test.ts
@@ -299,7 +299,10 @@ describe('memcached@2.x', () => {
const span = instrumentationSpans[1]; // get operation
// old `db.*`
- assert.strictEqual(span.attributes[ATTR_DB_SYSTEM], DB_SYSTEM_VALUE_MEMCACHED);
+ assert.strictEqual(
+ span.attributes[ATTR_DB_SYSTEM],
+ DB_SYSTEM_VALUE_MEMCACHED
+ );
assert.strictEqual(span.attributes[ATTR_DB_OPERATION], 'get');
// stable `db.*`
assert.strictEqual(span.attributes[ATTR_DB_SYSTEM_NAME], undefined);
@@ -332,7 +335,10 @@ describe('memcached@2.x', () => {
assert.strictEqual(span.attributes[ATTR_DB_SYSTEM], undefined);
assert.strictEqual(span.attributes[ATTR_DB_OPERATION], undefined);
// stable `db.*`
- assert.strictEqual(span.attributes[ATTR_DB_SYSTEM_NAME], DB_SYSTEM_NAME_VALUE_MEMCACHED);
+ assert.strictEqual(
+ span.attributes[ATTR_DB_SYSTEM_NAME],
+ DB_SYSTEM_NAME_VALUE_MEMCACHED
+ );
assert.strictEqual(span.attributes[ATTR_DB_OPERATION_NAME], 'get');
// old `net.*`
diff --git a/packages/instrumentation-mongodb/src/instrumentation.ts b/packages/instrumentation-mongodb/src/instrumentation.ts
index f4d8153ac0..13390c0b17 100644
--- a/packages/instrumentation-mongodb/src/instrumentation.ts
+++ b/packages/instrumentation-mongodb/src/instrumentation.ts
@@ -63,8 +63,8 @@ const DEFAULT_CONFIG: MongoDBInstrumentationConfig = {
/** mongodb instrumentation plugin for OpenTelemetry */
export class MongoDBInstrumentation extends InstrumentationBase {
- private declare _connectionsUsage: UpDownCounter;
- private declare _poolName: string;
+ declare private _connectionsUsage: UpDownCounter;
+ declare private _poolName: string;
constructor(config: MongoDBInstrumentationConfig = {}) {
super(PACKAGE_NAME, PACKAGE_VERSION, { ...DEFAULT_CONFIG, ...config });
diff --git a/packages/instrumentation-mysql/src/instrumentation.ts b/packages/instrumentation-mysql/src/instrumentation.ts
index c030dc54f7..c688e15cc9 100644
--- a/packages/instrumentation-mysql/src/instrumentation.ts
+++ b/packages/instrumentation-mysql/src/instrumentation.ts
@@ -56,7 +56,7 @@ export class MySQLInstrumentation extends InstrumentationBase {
- return (d && d(target, key)) || o;
- }, void 0);
+ return decorators.reduceRight(
+ (o: any, d: Function) => {
+ return (d && d(target, key)) || o;
+ },
+ void 0
+ );
case 4:
return decorators.reduceRight((o: any, d: Function) => {
return (d && d(target, key, o)) || o;
diff --git a/packages/instrumentation-net/src/instrumentation.ts b/packages/instrumentation-net/src/instrumentation.ts
index 5e20f6baa2..84f9a130f7 100644
--- a/packages/instrumentation-net/src/instrumentation.ts
+++ b/packages/instrumentation-net/src/instrumentation.ts
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-import { Span, SpanStatusCode, context, trace, type Attributes } from '@opentelemetry/api';
+import {
+ Span,
+ SpanStatusCode,
+ context,
+ trace,
+ type Attributes,
+} from '@opentelemetry/api';
import {
InstrumentationBase,
InstrumentationConfig,
@@ -44,7 +50,11 @@ import {
} from './semconv';
import { TLSAttributes } from './types';
import { NormalizedOptions, SocketEvent } from './internal-types';
-import { getNormalizedArgs, OLD_IPC_TRANSPORT_VALUE, STABLE_IPC_TRANSPORT_VALUE } from './utils';
+import {
+ getNormalizedArgs,
+ OLD_IPC_TRANSPORT_VALUE,
+ STABLE_IPC_TRANSPORT_VALUE,
+} from './utils';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { Socket } from 'net';
@@ -271,7 +281,7 @@ function registerListeners(
socket: Socket,
span: Span,
hostAttributes: boolean,
- netSemconvStability: SemconvStability,
+ netSemconvStability: SemconvStability
) {
const setSpanError = spanErrorHandler(span);
const setSpanEnd = spanEndHandler(span);
diff --git a/packages/instrumentation-net/src/utils.ts b/packages/instrumentation-net/src/utils.ts
index e5d2557a44..256215a506 100644
--- a/packages/instrumentation-net/src/utils.ts
+++ b/packages/instrumentation-net/src/utils.ts
@@ -28,7 +28,9 @@ import { NET_TRANSPORT_VALUE_PIPE } from './semconv';
export const OLD_IPC_TRANSPORT_VALUE =
platform() === 'win32' ? NET_TRANSPORT_VALUE_PIPE : 'unix';
export const STABLE_IPC_TRANSPORT_VALUE =
- platform() === 'win32' ? NETWORK_TRANSPORT_VALUE_PIPE : NETWORK_TRANSPORT_VALUE_UNIX;
+ platform() === 'win32'
+ ? NETWORK_TRANSPORT_VALUE_PIPE
+ : NETWORK_TRANSPORT_VALUE_UNIX;
function getHost(args: unknown[]) {
return typeof args[1] === 'string' ? args[1] : 'localhost';
diff --git a/packages/instrumentation-net/test/connect.test.ts b/packages/instrumentation-net/test/connect.test.ts
index 4843076b72..4002aec75e 100644
--- a/packages/instrumentation-net/test/connect.test.ts
+++ b/packages/instrumentation-net/test/connect.test.ts
@@ -221,7 +221,7 @@ describe('NetInstrumentation', () => {
(instrumentation as any)._setSemconvStabilityFromEnv();
});
- it('tcp with OTEL_SEMCONV_STABILITY_OPT_IN=(empty)', (done) => {
+ it('tcp with OTEL_SEMCONV_STABILITY_OPT_IN=(empty)', done => {
process.env.OTEL_SEMCONV_STABILITY_OPT_IN = '';
(instrumentation as any)._setSemconvStabilityFromEnv();
memoryExporter.reset();
@@ -232,7 +232,7 @@ describe('NetInstrumentation', () => {
});
});
- it('tcp with OTEL_SEMCONV_STABILITY_OPT_IN=http', (done) => {
+ it('tcp with OTEL_SEMCONV_STABILITY_OPT_IN=http', done => {
process.env.OTEL_SEMCONV_STABILITY_OPT_IN = 'http';
(instrumentation as any)._setSemconvStabilityFromEnv();
memoryExporter.reset();
@@ -243,7 +243,7 @@ describe('NetInstrumentation', () => {
});
});
- it('ipc with OTEL_SEMCONV_STABILITY_OPT_IN=(empty)', (done) => {
+ it('ipc with OTEL_SEMCONV_STABILITY_OPT_IN=(empty)', done => {
process.env.OTEL_SEMCONV_STABILITY_OPT_IN = '';
(instrumentation as any)._setSemconvStabilityFromEnv();
memoryExporter.reset();
@@ -254,7 +254,7 @@ describe('NetInstrumentation', () => {
});
});
- it('ipc with OTEL_SEMCONV_STABILITY_OPT_IN=http', (done) => {
+ it('ipc with OTEL_SEMCONV_STABILITY_OPT_IN=http', done => {
process.env.OTEL_SEMCONV_STABILITY_OPT_IN = 'http';
(instrumentation as any)._setSemconvStabilityFromEnv();
memoryExporter.reset();
diff --git a/packages/instrumentation-net/test/tls.test.ts b/packages/instrumentation-net/test/tls.test.ts
index daa50855ac..3f6f14c0d1 100644
--- a/packages/instrumentation-net/test/tls.test.ts
+++ b/packages/instrumentation-net/test/tls.test.ts
@@ -100,7 +100,11 @@ describe('NetInstrumentation', () => {
},
},
() => {
- assertTLSSpan(getTLSSpans(), tlsSocket, DEFAULT_NET_SEMCONV_STABILITY);
+ assertTLSSpan(
+ getTLSSpans(),
+ tlsSocket,
+ DEFAULT_NET_SEMCONV_STABILITY
+ );
done();
}
);
@@ -133,7 +137,11 @@ describe('NetInstrumentation', () => {
},
},
() => {
- assertTLSSpan(getTLSSpans(), tlsSocket, DEFAULT_NET_SEMCONV_STABILITY);
+ assertTLSSpan(
+ getTLSSpans(),
+ tlsSocket,
+ DEFAULT_NET_SEMCONV_STABILITY
+ );
done();
}
);
diff --git a/packages/instrumentation-net/test/utils.ts b/packages/instrumentation-net/test/utils.ts
index bd1860129e..050049d104 100644
--- a/packages/instrumentation-net/test/utils.ts
+++ b/packages/instrumentation-net/test/utils.ts
@@ -17,7 +17,15 @@
import { SpanKind, type Attributes } from '@opentelemetry/api';
import { ReadableSpan } from '@opentelemetry/sdk-trace-base';
import { SemconvStability } from '@opentelemetry/instrumentation';
-import { ATTR_NETWORK_LOCAL_ADDRESS, ATTR_NETWORK_LOCAL_PORT, ATTR_NETWORK_PEER_ADDRESS, ATTR_NETWORK_TRANSPORT, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, NETWORK_TRANSPORT_VALUE_TCP } from '@opentelemetry/semantic-conventions';
+import {
+ ATTR_NETWORK_LOCAL_ADDRESS,
+ ATTR_NETWORK_LOCAL_PORT,
+ ATTR_NETWORK_PEER_ADDRESS,
+ ATTR_NETWORK_TRANSPORT,
+ ATTR_SERVER_ADDRESS,
+ ATTR_SERVER_PORT,
+ NETWORK_TRANSPORT_VALUE_TCP,
+} from '@opentelemetry/semantic-conventions';
import {
ATTR_NET_HOST_IP,
ATTR_NET_HOST_PORT,
@@ -31,7 +39,10 @@ import * as assert from 'assert';
import * as path from 'path';
import * as os from 'os';
import { Socket } from 'net';
-import { OLD_IPC_TRANSPORT_VALUE, STABLE_IPC_TRANSPORT_VALUE } from '../src/utils';
+import {
+ OLD_IPC_TRANSPORT_VALUE,
+ STABLE_IPC_TRANSPORT_VALUE,
+} from '../src/utils';
import { TLSAttributes } from '../src/types';
import * as fs from 'fs';
@@ -42,7 +53,11 @@ export const IPC_PATH =
? path.join(os.tmpdir(), 'otel-js-net-test-ipc')
: '\\\\.\\pipe\\otel-js-net-test-ipc';
-export function assertTcpSpan(span: ReadableSpan, socket: Socket, netSemconvStability: SemconvStability) {
+export function assertTcpSpan(
+ span: ReadableSpan,
+ socket: Socket,
+ netSemconvStability: SemconvStability
+) {
assertSpanKind(span);
const attributes: Attributes = {};
@@ -65,7 +80,10 @@ export function assertTcpSpan(span: ReadableSpan, socket: Socket, netSemconvStab
assert.deepEqual(span.attributes, attributes);
}
-export function assertIpcSpan(span: ReadableSpan, netSemconvStability: SemconvStability) {
+export function assertIpcSpan(
+ span: ReadableSpan,
+ netSemconvStability: SemconvStability
+) {
assertSpanKind(span);
const attributes: Attributes = {};
if (netSemconvStability & SemconvStability.OLD) {
@@ -82,7 +100,7 @@ export function assertIpcSpan(span: ReadableSpan, netSemconvStability: SemconvSt
export function assertTLSSpan(
{ netSpan, tlsSpan }: { netSpan: ReadableSpan; tlsSpan: ReadableSpan },
_socket: Socket,
- netSemconvStability: SemconvStability,
+ netSemconvStability: SemconvStability
) {
assertParentChild(tlsSpan, netSpan);
assertSpanKind(netSpan);
diff --git a/packages/instrumentation-pg/src/instrumentation.ts b/packages/instrumentation-pg/src/instrumentation.ts
index fc756c0c48..87811bd8a2 100644
--- a/packages/instrumentation-pg/src/instrumentation.ts
+++ b/packages/instrumentation-pg/src/instrumentation.ts
@@ -78,9 +78,9 @@ function extractModuleExports(module: any) {
}
export class PgInstrumentation extends InstrumentationBase {
- private declare _operationDuration: Histogram;
- private declare _connectionsCount: UpDownCounter;
- private declare _connectionPendingRequests: UpDownCounter;
+ declare private _operationDuration: Histogram;
+ declare private _connectionsCount: UpDownCounter;
+ declare private _connectionPendingRequests: UpDownCounter;
// Pool events connect, acquire, release and remove can be called
// multiple times without changing the values of total, idle and waiting
// connections. The _connectionsCounter is used to keep track of latest
diff --git a/packages/instrumentation-pino/src/log-sending-utils.ts b/packages/instrumentation-pino/src/log-sending-utils.ts
index 239b514360..0d81988e6d 100644
--- a/packages/instrumentation-pino/src/log-sending-utils.ts
+++ b/packages/instrumentation-pino/src/log-sending-utils.ts
@@ -131,10 +131,10 @@ interface OTelPinoStreamOptions {
* The event arguments are: `logLine: string`, `err: string | Error`.
*/
export class OTelPinoStream extends Writable {
- private declare _otelLogger: Logger;
- private declare _messageKey: string;
- private declare _levels;
- private declare _otelTimestampFromTime;
+ declare private _otelLogger: Logger;
+ declare private _messageKey: string;
+ declare private _levels;
+ declare private _otelTimestampFromTime;
constructor(options: OTelPinoStreamOptions) {
super();
diff --git a/packages/instrumentation-redis/src/v4-v5/instrumentation.ts b/packages/instrumentation-redis/src/v4-v5/instrumentation.ts
index 1b0ffcaf89..7b15e2e896 100644
--- a/packages/instrumentation-redis/src/v4-v5/instrumentation.ts
+++ b/packages/instrumentation-redis/src/v4-v5/instrumentation.ts
@@ -501,8 +501,8 @@ export class RedisInstrumentationV4_V5 extends InstrumentationBase x.descriptor.name === METRIC_NODEJS_EVENTLOOP_UTILIZATION
- );
+ x => x.descriptor.name === METRIC_NODEJS_EVENTLOOP_UTILIZATION
+ );
assert.notEqual(utilizationMetric, undefined, 'metric not found');
assert.strictEqual(
diff --git a/packages/instrumentation-tedious/src/instrumentation.ts b/packages/instrumentation-tedious/src/instrumentation.ts
index ad88378278..15e5f5c9b9 100644
--- a/packages/instrumentation-tedious/src/instrumentation.ts
+++ b/packages/instrumentation-tedious/src/instrumentation.ts
@@ -279,7 +279,7 @@ export class TediousInstrumentation extends InstrumentationBase {
export interface ResponseHookFunction<
RequestType = UndiciRequest,
- ResponseType = UndiciResponse
+ ResponseType = UndiciResponse,
> {
(span: Span, info: { request: RequestType; response: ResponseType }): void;
}
@@ -68,7 +68,7 @@ export interface StartSpanHookFunction {
// so it seems logical to have similar options than the HTTP instrumentation
export interface UndiciInstrumentationConfig<
RequestType = UndiciRequest,
- ResponseType = UndiciResponse
+ ResponseType = UndiciResponse,
> extends InstrumentationConfig {
/** Not trace all outgoing requests that matched with custom function */
ignoreRequestHook?: IgnoreRequestFunction;
diff --git a/packages/instrumentation-undici/src/undici.ts b/packages/instrumentation-undici/src/undici.ts
index 43673b6a01..d01f42317a 100644
--- a/packages/instrumentation-undici/src/undici.ts
+++ b/packages/instrumentation-undici/src/undici.ts
@@ -78,10 +78,10 @@ interface InstrumentationRecord {
export class UndiciInstrumentation extends InstrumentationBase {
// Keep ref to avoid https://github.com/nodejs/node/issues/42170 bug and for
// unsubscribing.
- private declare _channelSubs: Array;
+ declare private _channelSubs: Array;
private _recordFromReq = new WeakMap();
- private declare _httpClientDurationHistogram: Histogram;
+ declare private _httpClientDurationHistogram: Histogram;
constructor(config: UndiciInstrumentationConfig = {}) {
super(PACKAGE_NAME, PACKAGE_VERSION, config);
diff --git a/packages/instrumentation-user-interaction/src/instrumentation.ts b/packages/instrumentation-user-interaction/src/instrumentation.ts
index 599e1695db..3d4c4af439 100644
--- a/packages/instrumentation-user-interaction/src/instrumentation.ts
+++ b/packages/instrumentation-user-interaction/src/instrumentation.ts
@@ -54,7 +54,7 @@ export class UserInteractionInstrumentation extends InstrumentationBase();
- private declare _zonePatched?: boolean;
+ declare private _zonePatched?: boolean;
// for addEventListener/removeEventListener state
private _wrappedListeners = new WeakMap<
Function | EventListenerObject,
diff --git a/packages/instrumentation-web-exception/src/instrumentation.ts b/packages/instrumentation-web-exception/src/instrumentation.ts
index 0b57cc6bc0..2972740906 100644
--- a/packages/instrumentation-web-exception/src/instrumentation.ts
+++ b/packages/instrumentation-web-exception/src/instrumentation.ts
@@ -52,7 +52,7 @@ export class ExceptionInstrumentation extends InstrumentationBase {
const exporter = new InMemoryLogRecordExporter();
const logRecordProcessor = new SimpleLogRecordProcessor(exporter);
- const loggerProvider = new LoggerProvider({processors:[logRecordProcessor]});
+ const loggerProvider = new LoggerProvider({
+ processors: [logRecordProcessor],
+ });
logs.setGlobalLoggerProvider(loggerProvider);
// Helper function to throw an error of a specific type so that we can allow the error to propagate and test the instrumentation.
@@ -139,8 +141,14 @@ describe('ExceptionInstrumentation', () => {
const events = exporter.getFinishedLogRecords();
assert.ok(events.length > 0, 'Expected at least one log record');
const event = events[0];
- assert.strictEqual(event.attributes[ATTR_EXCEPTION_MESSAGE], 'Something happened!');
- assert.strictEqual(event.attributes[ATTR_EXCEPTION_TYPE], 'ValidationError');
+ assert.strictEqual(
+ event.attributes[ATTR_EXCEPTION_MESSAGE],
+ 'Something happened!'
+ );
+ assert.strictEqual(
+ event.attributes[ATTR_EXCEPTION_TYPE],
+ 'ValidationError'
+ );
assert.strictEqual(event.attributes[ATTR_EXCEPTION_STACKTRACE], stack);
}, 0);
});
@@ -154,7 +162,10 @@ describe('ExceptionInstrumentation', () => {
const events = exporter.getFinishedLogRecords();
assert.ok(events.length > 0, 'Expected at least one log record');
const event = events[0];
- assert.strictEqual(event.attributes[ATTR_EXCEPTION_MESSAGE], STRING_ERROR);
+ assert.strictEqual(
+ event.attributes[ATTR_EXCEPTION_MESSAGE],
+ STRING_ERROR
+ );
}, 0);
});
});
@@ -208,8 +219,14 @@ describe('ExceptionInstrumentation', () => {
const events = exporter.getFinishedLogRecords();
assert.ok(events.length > 0, 'Expected at least one log record');
const event = events[0];
- assert.strictEqual(event.attributes[ATTR_EXCEPTION_MESSAGE], STRING_ERROR);
- assert.strictEqual(event.attributes['app.custom.exception'], STRING_ERROR.toLocaleUpperCase());
+ assert.strictEqual(
+ event.attributes[ATTR_EXCEPTION_MESSAGE],
+ STRING_ERROR
+ );
+ assert.strictEqual(
+ event.attributes['app.custom.exception'],
+ STRING_ERROR.toLocaleUpperCase()
+ );
}, 0);
});
});
diff --git a/packages/propagator-aws-xray/src/AWSXRayPropagator.ts b/packages/propagator-aws-xray/src/AWSXRayPropagator.ts
index a0def93418..7f001c8045 100644
--- a/packages/propagator-aws-xray/src/AWSXRayPropagator.ts
+++ b/packages/propagator-aws-xray/src/AWSXRayPropagator.ts
@@ -85,7 +85,7 @@ export class AWSXRayPropagator implements TextMapPropagator {
const existingSpan = trace.getSpan(context);
const existingTraceState = existingSpan?.spanContext()?.traceState;
if (existingTraceState) {
- spanContext.traceState = existingTraceState
+ spanContext.traceState = existingTraceState;
}
return trace.setSpan(context, trace.wrapSpanContext(spanContext));
}
diff --git a/packages/resource-detector-azure/src/types.ts b/packages/resource-detector-azure/src/types.ts
index 965bbba4ad..8fbf855ebf 100644
--- a/packages/resource-detector-azure/src/types.ts
+++ b/packages/resource-detector-azure/src/types.ts
@@ -82,7 +82,7 @@ export interface AzureVmMetadata {
{
keyData?: string;
path?: string;
- }
+ },
];
publisher?: string;
resourceGroupName?: string;
@@ -118,7 +118,7 @@ export interface AzureVmMetadata {
uri?: string;
};
writeAcceleratorEnabled?: string;
- }
+ },
];
imageReference?: {
id?: string;
diff --git a/packages/sampler-aws-xray/test/aws-xray-sampling-client.test.ts b/packages/sampler-aws-xray/test/aws-xray-sampling-client.test.ts
index 628b000110..3e64ef6f2d 100644
--- a/packages/sampler-aws-xray/test/aws-xray-sampling-client.test.ts
+++ b/packages/sampler-aws-xray/test/aws-xray-sampling-client.test.ts
@@ -173,8 +173,9 @@ describe('AWSXRaySamplingClient', () => {
});
it('testGetSamplingTargets', done => {
- const data = require(DATA_DIR +
- '/get-sampling-targets-response-sample.json');
+ const data = require(
+ DATA_DIR + '/get-sampling-targets-response-sample.json'
+ );
nock(TEST_URL).post('/SamplingTargets').reply(200, data);
const client = new AWSXRaySamplingClient(TEST_URL, new DiagConsoleLogger());
diff --git a/packages/sampler-aws-xray/test/sampling-rule-applier.test.ts b/packages/sampler-aws-xray/test/sampling-rule-applier.test.ts
index 0906a6545a..a75cacf554 100644
--- a/packages/sampler-aws-xray/test/sampling-rule-applier.test.ts
+++ b/packages/sampler-aws-xray/test/sampling-rule-applier.test.ts
@@ -41,8 +41,9 @@ const DATA_DIR = __dirname + '/data';
describe('SamplingRuleApplier', () => {
it('testApplierAttributeMatchingFromXRayResponse', () => {
- const sampleData = require(DATA_DIR +
- '/get-sampling-rules-response-sample-2.json');
+ const sampleData = require(
+ DATA_DIR + '/get-sampling-rules-response-sample-2.json'
+ );
const allRules = sampleData['SamplingRuleRecords'];
const defaultRule: SamplingRule = allRules[0]['SamplingRule'];
diff --git a/scripts/codecov-upload-flags.mjs b/scripts/codecov-upload-flags.mjs
index 28bcab3f93..449b3f5d74 100644
--- a/scripts/codecov-upload-flags.mjs
+++ b/scripts/codecov-upload-flags.mjs
@@ -42,6 +42,7 @@ const pkgsWithFlag = pkgFiles.flat().map(f => {
// ./codecov --verbose upload-coverage --help
// ```
// or check https://docs.codecov.com/docs/cli-options
+ // prettier-ignore
const command = [
'./codecov --verbose',
'upload-coverage',
@@ -93,7 +94,10 @@ if (existsSync(codecovPath)) {
);
execSync(`curl -O "${url}.SHA256SUM"`, execOpts);
execSync(`curl -O "${url}.SHA256SUM.sig"`, execOpts);
- execSync('gpg --verify "codecov.SHA256SUM.sig" "codecov.SHA256SUM"', execOpts);
+ execSync(
+ 'gpg --verify "codecov.SHA256SUM.sig" "codecov.SHA256SUM"',
+ execOpts
+ );
}
// make sure we have exec perms
chmodSync(codecovPath, 0o555);
diff --git a/scripts/gen-semconv-ts.js b/scripts/gen-semconv-ts.js
index 9db45635e7..e824027840 100755
--- a/scripts/gen-semconv-ts.js
+++ b/scripts/gen-semconv-ts.js
@@ -72,10 +72,9 @@ function genSemconvTs(wsDir) {
paths: [path.join(wsDir, 'node_modules')],
});
const semconvStable = require(semconvPath);
- const semconvVer = require(path.resolve(
- semconvPath,
- '../../../package.json'
- )).version;
+ const semconvVer = require(
+ path.resolve(semconvPath, '../../../package.json')
+ ).version;
// Gather unstable semconv imports. Consider any imports from
// '@opentelemetry/semantic-conventions/incubating' or from an existing local
diff --git a/scripts/lint-readme.js b/scripts/lint-readme.js
index fffcbfdb69..1a8654a3a1 100644
--- a/scripts/lint-readme.js
+++ b/scripts/lint-readme.js
@@ -20,10 +20,12 @@ const path = require('path');
const packageRoot = process.cwd();
const monorepoRoot = path.resolve(__dirname, '..');
-const autoInstrumentationNodeDeps =
- require(`${monorepoRoot}/packages/auto-instrumentations-node/package.json`).dependencies;
-const autoInstrumentationWebDeps =
- require(`${monorepoRoot}/packages/auto-instrumentations-web/package.json`).dependencies;
+const autoInstrumentationNodeDeps = require(
+ `${monorepoRoot}/packages/auto-instrumentations-node/package.json`
+).dependencies;
+const autoInstrumentationWebDeps = require(
+ `${monorepoRoot}/packages/auto-instrumentations-web/package.json`
+).dependencies;
// remove exempt instrumentations
delete autoInstrumentationNodeDeps['@opentelemetry/instrumentation-fastify'];