Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Amir Blum <[email protected]>
  • Loading branch information
schmalzs and blumamir authored Aug 10, 2023
1 parent 06788e2 commit 310b75d
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ export class AwsLambdaInstrumentation extends InstrumentationBase {

// _HANDLER and LAMBDA_TASK_ROOT are always defined in Lambda but guard bail out if in the future this changes.
if (!taskRoot || !handlerDef) {
diag.debug(
'Unable to initialize instrumentation for lambda. Cannot identify lambda handler.'
diag.error(
'Unable to initialize instrumentation for lambda. Cannot identify lambda handler or task root.', {taskRoot, handlerDef}
);
return [];
}
Expand All @@ -126,17 +126,15 @@ export class AwsLambdaInstrumentation extends InstrumentationBase {
}
}

diag.debug(
`Instrumenting lambda handler: ${JSON.stringify({
diag.debug("Instrumenting lambda handler", {
taskRoot,
handlerDef,
handler,
moduleRoot,
module,
filename,
functionName,
})}`
);
});

return [
new InstrumentationNodeModuleDefinition(
Expand Down

0 comments on commit 310b75d

Please sign in to comment.