Skip to content

Conversation

@mjameswh
Copy link
Contributor

What changed

  • Attributes from the current Workflow are now automatically included as metadata on every log entries by the Workflow Worker, and some key events of the Workflow's lifecycle will automatically be logged (at 'DEBUG' level for most messages; 'WARN' for failures).

  • Deprecated WorkflowLogInterceptor; it is now a no-op.

  • Deprecated appendDefaultInterceptors. It is now a no-op in all cases, except when a custom logger is supplied, in which case it adds a ActivityInboundLogInterceptor to register that custom logger on Activity context.

Why

  • These changes adds up to better DX, notably by:
    • Promoting clear usage patterns regarding Workflow logging that works out-of-the-box;
    • Remove the requirement that users should call appendDefaultInterceptors() if they were to register custom interceptors, which was error prone and a recurring source of support question.
  • Prepare the code base for other, similar upcoming refactors and some features (eg. custom metrics, context forwarding, etc).

@mjameswh mjameswh requested a review from a team as a code owner November 13, 2023 18:41
throw error;
}
);
// Avoid showing this interceptor in stack trace query
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Avoid showing this interceptor in stack trace query
// Avoid showing this promise in stack trace query

Base automatically changed from depreacte-activity-log-interceptor to main November 15, 2023 16:01
@mjameswh mjameswh merged commit 4b265ec into main Nov 15, 2023
@mjameswh mjameswh deleted the deprecate-workflow-log-interceptor branch November 15, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants