Skip to content

Commit bdc0e3a

Browse files
cjihrigpichlermarc
andauthored
chore(instrumentation-grpc): remove unused findIndex() function (open-telemetry#5372)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
1 parent 2a26d08 commit bdc0e3a

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

experimental/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ All notable changes to experimental packages in this project will be documented
2929

3030
### :house: (Internal)
3131

32+
* chore(instrumentation-grpc): remove unused findIndex() function [#5372](https://github.com/open-telemetry/opentelemetry-js/pull/5372) @cjihrig
3233
* refactor(otlp-exporter-base): remove unnecessary isNaN() checks [#5374](https://github.com/open-telemetry/opentelemetry-js/pull/5374) @cjihrig
3334

3435
## 0.57.0

experimental/packages/opentelemetry-instrumentation-grpc/src/utils.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,6 @@ import type { IgnoreMatcher } from './types';
2323
export const URI_REGEX =
2424
/(?:([A-Za-z0-9+.-]+):(?:\/\/)?)?(?<name>[A-Za-z0-9+.-]+):(?<port>[0-9+.-]+)$/;
2525

26-
// Equivalent to lodash _.findIndex
27-
export const findIndex: <T>(args: T[], fn: (arg: T) => boolean) => number = (
28-
args,
29-
fn
30-
) => {
31-
let index = -1;
32-
for (const arg of args) {
33-
index++;
34-
if (fn(arg)) {
35-
return index;
36-
}
37-
}
38-
return -1;
39-
};
40-
4126
/**
4227
* Convert a grpc status code to an opentelemetry SpanStatus code.
4328
* @param status

0 commit comments

Comments
 (0)