-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(otlp): manual span #3647
base: master
Are you sure you want to change the base?
fix(otlp): manual span #3647
Conversation
syncJobId?: number | undefined; | ||
track_deletes?: boolean; | ||
attributes?: object | undefined; | ||
abortSignal?: AbortSignal; | ||
syncConfig: DBSyncConfig; | ||
runnerFlags: RunnerFlags; | ||
/** | ||
* @deprecated not used | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is only debug deprecated?
@@ -21,8 +21,7 @@ export function initSentry({ dsn, hash, applicationName }: { dsn: string | undef | |||
Sentry.init({ | |||
dsn: dsn || '', | |||
sampleRate: 1, | |||
tracesSampleRate: 0, | |||
openTelemetryInstrumentations: [], | |||
skipOpenTelemetrySetup: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a comment to explain why we set skipOpenTelemetrySetup to true?
@@ -92,6 +93,7 @@ export async function startSync(task: TaskSync, startScriptFn = startScript): Pr | |||
meta: { scriptVersion: syncConfig.version } | |||
} | |||
); | |||
logCtx.attachSpan(new OtlpSpan(logCtx.operation, startedAt)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a huge fan of this pseudo independent attachSpan
function that we need to sprinkle all over the codebase.
Since it always depends on a logContextGetter.create
why not making it a part of it.
can logContextGetter.create
take a otlpSpan?: { startedAt?: Date } params
. When it is passed the create
function can set span = new OtlpSpan(...)
Changes
Contributes to https://linear.app/nango/issue/NAN-2803/investigate-otlp-export
Manually declare OTLP span
We need to dissociate span creation from logCtx, because getting the operation entirely from ES is not a viable solution. This fix only changes Span to be declared manually but does not fix the main issue. Just wanted to be sure it was doable and limit the scope of this PR.
Fix nangoProps type
Fix OTLP export broken by Sentry (skipOtel)