Include tracking_label for vmdb-logger #183
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In workers, we have a global variable
$_miq_worker_current_msg
that holds the currentMiqQueue
message being processed. This puts a common identifier in logs to help find related logging messages.We are transitioning away from
task_id
forMiqQueue
because the concept is not transferrable to other queuing technologies.This change allows us to still have a global tracking label/identifier. It also lets us get away from a global that is very implementation specific.
Also, it allows us to get away from using
task_id
in some areas of code that don't need it, and still get the benefits of having a common identifier in the logs.This is related to ManageIQ/manageiq#15224
In the future, using an
mdc
for the log may be a better approach. This PR was just focused on removing theMiqQueue
dependency and providing backwards compatibility.