Skip to content

Commit

Permalink
Merge branch 'main' into mike/baggage-span-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeGoldsmith authored May 2, 2024
2 parents b0c35a6 + 525bbba commit ae60cae
Show file tree
Hide file tree
Showing 14 changed files with 312 additions and 329 deletions.
109 changes: 0 additions & 109 deletions examples/postgres/README.md

This file was deleted.

33 changes: 0 additions & 33 deletions examples/postgres/client.js

This file was deleted.

Binary file removed examples/postgres/images/jaeger.png
Binary file not shown.
Binary file removed examples/postgres/images/zipkin.png
Binary file not shown.
48 changes: 0 additions & 48 deletions examples/postgres/package.json

This file was deleted.

54 changes: 0 additions & 54 deletions examples/postgres/server.js

This file was deleted.

32 changes: 0 additions & 32 deletions examples/postgres/setupPsql.js

This file was deleted.

43 changes: 0 additions & 43 deletions examples/postgres/tracer.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { AttributeNames } from './enums/AttributeNames';
import {
asErrorAndMessage,
getLayerMetadata,
getLayerPath,
isLayerIgnored,
storeLayerPath,
} from './utils';
Expand Down Expand Up @@ -115,10 +116,7 @@ export class ExpressInstrumentation extends InstrumentationBase {
) {
const route = original.apply(this, args);
const layer = this.stack[this.stack.length - 1] as ExpressLayer;
instrumentation._applyPatch(
layer,
typeof args[0] === 'string' ? args[0] : undefined
);
instrumentation._applyPatch(layer, getLayerPath(args));
return route;
};
};
Expand All @@ -136,10 +134,7 @@ export class ExpressInstrumentation extends InstrumentationBase {
) {
const route = original.apply(this, args);
const layer = this.stack[this.stack.length - 1] as ExpressLayer;
instrumentation._applyPatch(
layer,
typeof args[0] === 'string' ? args[0] : undefined
);
instrumentation._applyPatch(layer, getLayerPath(args));
return route;
};
};
Expand All @@ -160,7 +155,7 @@ export class ExpressInstrumentation extends InstrumentationBase {
instrumentation._applyPatch.call(
instrumentation,
layer,
typeof args[0] === 'string' ? args[0] : undefined
getLayerPath(args)
);
return route;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { Span } from '@opentelemetry/api';
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
import { ExpressLayerType } from './enums/ExpressLayerType';

export type LayerPathSegment = string | RegExp | number;

export type IgnoreMatcher = string | RegExp | ((name: string) => boolean);

export type ExpressRequestInfo<T = any> = {
Expand Down
Loading

0 comments on commit ae60cae

Please sign in to comment.