Skip to content

Commit

Permalink
address mathieu comments 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
usmanmani1122 committed Oct 27, 2024
1 parent 8eea7b9 commit f47d99c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/telemetry/src/context-aware-slog.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,8 @@ export const makeContextualSlogProcessor = (
}
// eslint-disable-next-line no-restricted-syntax
case SLOG_TYPES.COSMIC_SWINGSET.RUN.FINISH: {
persistContext(
finalBody.remainingBeans || !triggerContext ? {} : triggerContext,
);
assert(!!triggerContext);
persistContext(finalBody.remainingBeans ? {} : triggerContext);
triggerContext = null;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/telemetry/src/otel-context-aware-slog.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const makeSlogSender = async options => {
const [secondsStr, fractionStr] = String(timestamp).split('.');
const seconds = parseInt(secondsStr, 10);
const nanoSeconds = parseInt(
(fractionStr || String(0)).padEnd(9, String(0)),
(fractionStr || String(0)).padEnd(9, String(0)).slice(0, 9),
10,
);

Expand Down

0 comments on commit f47d99c

Please sign in to comment.