Skip to content

Commit

Permalink
use @knipignore jsdoc tag to skip errors about missing generated vers…
Browse files Browse the repository at this point in the history
…ion.ts files
  • Loading branch information
trentm committed Oct 10, 2024
1 parent 3f236e7 commit 47ee30b
Show file tree
Hide file tree
Showing 47 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"bump": "lerna publish",
"changelog": "lerna-changelog",
"lint": "lerna run lint && npm run lint:deps",
"lint:deps": "knip --dependencies --production",
"lint:deps": "knip --dependencies --production --tags=-knipignore",
"lint:fix": "lerna run lint:fix",
"lint:examples": "eslint ./examples/**/*.js",
"lint:examples:fix": "eslint ./examples/**/*.js --fix",
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-host-metrics/src/BaseMetrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import { Meter, MeterProvider, diag, metrics } from '@opentelemetry/api';

/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

/**
Expand Down
1 change: 1 addition & 0 deletions packages/winston-transport/src/OpenTelemetryTransportV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import { Logger, logs } from '@opentelemetry/api-logs';
import TransportStream = require('winston-transport');
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { emitLogRecord } from './utils';

Expand Down
1 change: 1 addition & 0 deletions plugins/node/instrumentation-amqplib/src/amqplib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ import {
normalizeExchange,
unmarkConfirmChannelTracing,
} from './utils';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

const supportedVersions = ['>=0.5.5 <1'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import type {
} from '@cucumber/cucumber/lib/support_code_library_builder/types';

import { AttributeNames, CucumberInstrumentationConfig } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

const hooks = ['Before', 'BeforeStep', 'AfterStep', 'After'] as const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
SpanKind,
} from '@opentelemetry/api';
import { DataloaderInstrumentationConfig } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import type * as Dataloader from 'dataloader';

Expand Down
1 change: 1 addition & 0 deletions plugins/node/instrumentation-fs/src/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
InstrumentationNodeModuleDefinition,
isWrapped,
} from '@opentelemetry/instrumentation';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
CALLBACK_FUNCTIONS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import type {
Consumer,
} from 'kafkajs';
import { KafkaJsInstrumentationConfig } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { bufferTextMapGetter } from './propagator';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
InstrumentationConfig,
InstrumentationNodeModuleDefinition,
} from '@opentelemetry/instrumentation';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

export class LruMemoizerInstrumentation extends InstrumentationBase {
Expand Down
1 change: 1 addition & 0 deletions plugins/node/instrumentation-mongoose/src/mongoose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
InstrumentationModuleDefinition,
InstrumentationNodeModuleDefinition,
} from '@opentelemetry/instrumentation';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
SEMATTRS_DB_OPERATION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const { eventLoopUtilization } = performance;

import { InstrumentationBase } from '@opentelemetry/instrumentation';

/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { RuntimeNodeInstrumentationConfig } from './types';

Expand Down
1 change: 1 addition & 0 deletions plugins/node/instrumentation-socket.io/src/socket.io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
} from '@opentelemetry/semantic-conventions';
import { SocketIoInstrumentationConfig } from './types';
import { SocketIoInstrumentationAttributes } from './AttributeNames';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
extractRoomsAttributeValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
import type * as tedious from 'tedious';
import { TediousInstrumentationConfig } from './types';
import { getSpanName, once } from './utils';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

const CURRENT_DATABASE = Symbol(
Expand Down
1 change: 1 addition & 0 deletions plugins/node/instrumentation-undici/src/undici.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
ValueType,
} from '@opentelemetry/api';

/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import {
} from 'aws-lambda';

import { AwsLambdaInstrumentationConfig, EventContextExtractor } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { env } from 'process';
import { LambdaModule } from './internal-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
NormalizedRequest,
NormalizedResponse,
} from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
InstrumentationBase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import { logs, SeverityNumber, Logger } from '@opentelemetry/api-logs';
import type { LogLevelString } from 'bunyan';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

const DEFAULT_INSTRUMENTATION_SCOPE_NAME = PACKAGE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
safeExecuteInTheMiddle,
} from '@opentelemetry/instrumentation';
import { BunyanInstrumentationConfig } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { OpenTelemetryBunyanStream } from './OpenTelemetryBunyanStream';
import type * as BunyanLogger from 'bunyan';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
SEMATTRS_NET_PEER_NAME,
SEMATTRS_NET_PEER_PORT,
} from '@opentelemetry/semantic-conventions';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { EventEmitter } from 'events';
import type * as CassandraDriver from 'cassandra-driver';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
ConnectTypes,
} from './enums/AttributeNames';
import { PatchedRequest, Use, UseArgs, UseArgs2 } from './internal-types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
InstrumentationBase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
import { AddressFamily } from './enums/AddressFamily';
import { DnsInstrumentationConfig } from './types';
import * as utils from './utils';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
LookupCallbackSignature,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
isLayerIgnored,
storeLayerPath,
} from './utils';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
InstrumentationBase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
safeExecuteInTheMiddleMaybePromise,
startSpan,
} from './utils';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

export const ANONYMOUS_NAME = 'anonymous';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {

import type * as genericPool from 'generic-pool';

/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

const MODULE_NAME = 'generic-pool';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import {
wrapFields,
} from './utils';

/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import * as api from '@opentelemetry/api';
import type { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
} from '@opentelemetry/instrumentation';

import type * as Hapi from '@hapi/hapi';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
HapiComponentName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
import { safeExecuteInTheMiddle } from '@opentelemetry/instrumentation';
import { endSpan } from './utils';
import { defaultDbStatementSerializer } from '@opentelemetry/redis-common';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

const DEFAULT_CONFIG: IORedisInstrumentationConfig = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

import * as api from '@opentelemetry/api';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import * as constants from './constants';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {

import type * as koa from 'koa';
import { KoaLayerType, KoaInstrumentationConfig } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { getMiddlewareMetadata, isLayerIgnored } from './utils';
import { getRPCMetadata, RPCType } from '@opentelemetry/core';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
} from '@opentelemetry/semantic-conventions';
import * as utils from './utils';
import { InstrumentationConfig } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

export class MemcachedInstrumentation extends InstrumentationBase<InstrumentationConfig> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import {
V4ConnectionPool,
} from './internal-types';
import { V4Connect, V4Session } from './internal-types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { UpDownCounter } from '@opentelemetry/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
getSpanName,
getPoolName,
} from './utils';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { UpDownCounter, MeterProvider } from '@opentelemetry/api';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
getSpanName,
once,
} from './utils';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

type formatType = typeof mysqlTypes.format;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
import type { NestFactory } from '@nestjs/core/nest-factory.js';
import type { RouterExecutionContext } from '@nestjs/core/router/router-execution-context.js';
import type { Controller } from '@nestjs/common/interfaces';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
SEMATTRS_HTTP_METHOD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
import { TLSAttributes } from './types';
import { NormalizedOptions, SocketEvent } from './internal-types';
import { getNormalizedArgs, IPC_TRANSPORT } from './utils';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { Socket } from 'net';
import { TLSSocket } from 'tls';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import {
import { PgInstrumentationConfig } from './types';
import * as utils from './utils';
import { addSqlCommenterComment } from '@opentelemetry/sql-common';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { SpanNames } from './enums/SpanNames';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
safeExecuteInTheMiddle,
} from '@opentelemetry/instrumentation';
import { PinoInstrumentationConfig } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { getTimeConverter, OTelPinoStream } from './log-sending-utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import { Writable } from 'stream';

import { logs, Logger, SeverityNumber } from '@opentelemetry/api-logs';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { millisToHrTime } from '@opentelemetry/core';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
import { getClientAttributes } from './utils';
import { defaultDbStatementSerializer } from '@opentelemetry/redis-common';
import { RedisInstrumentationConfig } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import { SEMATTRS_DB_STATEMENT } from '@opentelemetry/semantic-conventions';
import type { MultiErrorReply } from './internal-types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
getTracedInternalSendCommand,
} from './utils';
import { RedisInstrumentationConfig } from './types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

const DEFAULT_CONFIG: RedisInstrumentationConfig = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import * as api from '@opentelemetry/api';
import type { Server } from 'restify';
import { LayerType } from './types';
import { AttributeNames } from './enums/AttributeNames';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import * as constants from './constants';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import * as http from 'http';
import type * as Router from 'router';

import * as types from './internal-types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import * as constants from './constants';
import * as utils from './utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import type {
Winston3LogMethod,
Winston3Logger,
} from './internal-types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

const winston3Versions = ['>=3 <4'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
ResourceFetchCustomAttributeFunction,
} from './types';
import { AttributeNames } from './enums/AttributeNames';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import {
SEMATTRS_HTTP_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import { hrTime } from '@opentelemetry/core';
import { diag } from '@opentelemetry/api';
import { InstrumentationBase } from '@opentelemetry/instrumentation';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';
import type {
PerformanceLongTaskTiming,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
WindowWithZone,
ZoneTypeWithPrototype,
} from './internal-types';
/** @knipignore */
import { PACKAGE_NAME, PACKAGE_VERSION } from './version';

const ZONE_CONTEXT_KEY = 'OT_ZONE_CONTEXT';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { isWrapped } from '@opentelemetry/core';
import * as shimmer from 'shimmer';
import { AttributeNames } from './enums/AttributeNames';
import * as React from 'react';
/** @knipignore */
import { PACKAGE_VERSION } from './version';
import {
RenderFunction,
Expand Down

0 comments on commit 47ee30b

Please sign in to comment.