[go: up one dir, main page]

Skip to content

Send correlation_id of a parent request in asynchronous javascript requests

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Description

A new correlation_id gets generated in a few places (most frequently in Workhorse) after a new request is made to GitLab. Then we try to propagate this correlation_id throughout the application stack, for example, to Sidekiq or Gitaly, to understand the sequence of actions performed by GitLab.

It seems, however, that the correlation_id is being lost when a asynchronous request to GitLab is being made by our JavaScript tooling; in such case a new correlation_id is being generated.

Proposal

Send the parent correlation_id in a header from a JavaScript request, append it to logs as an additional field, for example correlation_ref or some other field that would indicate that this is a related / parent / upstream correlation_id that comes from an untrusted source.

Alternative

Alternatively, we should check if OpenTelemetry has a solution for this problem already.

/cc @stanhu @andrewn

Edited by 🤖 GitLab Bot 🤖