diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index c1762a1da63..e7126be0f78 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -29,6 +29,7 @@ All notable changes to experimental packages in this project will be documented ### :house: (Internal) +* chore(instrumentation-grpc): remove unused findIndex() function [#5372](https://github.com/open-telemetry/opentelemetry-js/pull/5372) @cjihrig * refactor(otlp-exporter-base): remove unnecessary isNaN() checks [#5374](https://github.com/open-telemetry/opentelemetry-js/pull/5374) @cjihrig ## 0.57.0 diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/src/utils.ts b/experimental/packages/opentelemetry-instrumentation-grpc/src/utils.ts index 3cfbfc1f55d..002a2da3355 100644 --- a/experimental/packages/opentelemetry-instrumentation-grpc/src/utils.ts +++ b/experimental/packages/opentelemetry-instrumentation-grpc/src/utils.ts @@ -23,21 +23,6 @@ import type { IgnoreMatcher } from './types'; export const URI_REGEX = /(?:([A-Za-z0-9+.-]+):(?:\/\/)?)?(?[A-Za-z0-9+.-]+):(?[0-9+.-]+)$/; -// Equivalent to lodash _.findIndex -export const findIndex: (args: T[], fn: (arg: T) => boolean) => number = ( - args, - fn -) => { - let index = -1; - for (const arg of args) { - index++; - if (fn(arg)) { - return index; - } - } - return -1; -}; - /** * Convert a grpc status code to an opentelemetry SpanStatus code. * @param status