Skip to content

Commit

Permalink
TRACING-4435 refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-sumo committed Oct 21, 2024
1 parent aeb030b commit 642cb1b
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { W3CTraceContextPropagator } from '@opentelemetry/core';
import {
W3CTraceContextPropagator,
CompositePropagator,
W3CBaggagePropagator,
} from '@opentelemetry/core';
import {
Span,
Tracer,
Expand Down Expand Up @@ -40,7 +44,6 @@ import {
import { version } from '../package.json';
import { getCurrentSessionId } from './sumologic-span-processor/session-id';
import { Attributes } from '@opentelemetry/api';
import { CompositePropagator, W3CBaggagePropagator } from '@opentelemetry/core';

type ReadyListener = () => void;

Expand Down Expand Up @@ -124,7 +127,6 @@ export const initialize = ({
}

const samplingProbabilityMaybeNumber = tryNumber(samplingProbability) ?? 1;

const defaultServiceName = serviceName ?? UNKNOWN_SERVICE_NAME;

const resourceAttributes: ResourceAttributes = {
Expand Down Expand Up @@ -228,12 +230,6 @@ export const initialize = ({
}
};

// const httpInstrumentation = new HttpInstrumentation({
// enabled: true,
// ignoreIncomingPaths: ['/youtube'],
// ignoreIncomingRequestHook: () => true, // Ignore every incoming request
// });

const registerInstrumentations = () => {
disableInstrumentations();
logsExporter.enable();
Expand All @@ -242,9 +238,7 @@ export const initialize = ({
registerOpenTelemetryInstrumentations({
tracerProvider: provider,
instrumentations: [
new LongTaskInstrumentation({
enabled: false,
}),
new LongTaskInstrumentation({ enabled: false }),
new DocumentLoadInstrumentation({ enabled: false }),
new UserInteractionInstrumentation({
enabled: false,
Expand Down Expand Up @@ -274,9 +268,6 @@ export const initialize = ({
new HttpInstrumentation({
enabled: true,
ignoreIncomingRequestHook: () => true,

// ignoreIncomingPaths: ['/youtube'],
// ignoreIncomingRequestHook: () => true, // Ignore every incoming request
}),
],
});
Expand Down

0 comments on commit 642cb1b

Please sign in to comment.