Skip to content

ScheduledTask should set a basic "traceId" by default #37

@KevinMcT

Description

@KevinMcT

ScheduledTask in its current for does not set any MDC values and thus there is very little traceability wrt logs surrounding a scheduled task run.

It would make sense to set some basic MDC properties in order for log lines to be easily correlatable and in addition being able to correlate the log lines generated by the library with the log lines genereated within the task (user space)

As an example from our log set up, these log lines generated from the library and any log lines generated within the task while executed won't have an associated traceId.
Image

Suggest setting the following MDC values before emitting any log lines internally in the lib and before running the user defined task.

  • traceId
  • scheduledTaskRunId
  • scheduledTaskName
  • scheduledTaskNameClean

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions