Skip to content
Snippets Groups Projects

Add distributed tracing with LabKit

Merged Andrew Newdigate requested to merge an-labkit-dtrace into master

See labkit!2 (merged) for details

Gitaly Companion MR: gitaly!976 (merged)

GitLab-CE companion MRs: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21280 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24186

Adds distributed tracing via LabKit.

Description

This change adds distributed tracing support through LabKit using OpenTracing APIs.

By default, no tracing implementation is linked into the Workhorse binary, but different OpenTracing providers can be linked in using build tags/build constraints. This can be done by setting the BUILD_TAGS make variable.

For more details of the supported providers, see LabKit, but as an example, for Jaeger tracing support, include the tags: BUILD_TAGS="tracer_static tracer_static_jaeger".

make BUILD_TAGS="tracer_static tracer_static_jaeger"

Once Workhorse is compiled with an opentracing provider, the tracing configuration is configured via the GITLAB_TRACING environment variable.

For example:

GITLAB_TRACING=opentracing://jaeger ./gitlab-workhorse

Testing

The best way to get a feel for how this works is to test it end-to-end. You can find detailed instructions of how to do this in the How to Test section here: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21280#how-to-test

Edited by Andrew Newdigate

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • assigned to @andrewn

  • Jacob Vosmaer approved this merge request

    approved this merge request

  • Assigning to @nick.thomas for second review just so that he knows about the new build tag options.

  • Nick Thomas resolved all discussions

    resolved all discussions

  • Thanks @jacobvosmaer-gitlab @andrewn

    Mostly LGTM, but there are merge conflicts! Also, vendor/vendor.json hasn't changed? Surely it should?

  • assigned to @andrewn

  • @nick.thomas Thank you! Investigating the vendor.json issue now :thinking:

    Also related documentation MR, as requested by @jacobvosmaer-gitlab: labkit!7 (merged)

  • Andrew Newdigate added 5 commits

    added 5 commits

    • 90a24ada...254f37c7 - 4 commits from branch master
    • 0696e4c2 - Merge branch 'master' of gitlab.com:gitlab-org/gitlab-workhorse into an-labkit-dtrace

    Compare with previous version

  • Also, vendor/vendor.json hasn't changed? Surely it should?

    @nick.thomas Strangely, this seems to be a UI bug of sorts in GitLab? :thinking:

    I can confirm that there are differences according to

    git diff master..an-labkit-dtrace vendor/vendor.json

    Also, they're visible in https://gitlab.com/gitlab-org/gitlab-workhorse/compare/master...an-labkit-dtrace (scroll to the bottom)

    I've fixed the conflicts...

  • @andrewn that's weird :( the limit on diffs is 1000 files, and we're well under that.

    Hah, when I look at diffs.json for this MR, I see Firefox tell me::

    SyntaxError: JSON.parse: unterminated string at line 1 column 1074725 of the JSON data

    I'll dig into that more. In the meantime, happy to merge this :thumbsup:

  • Nick Thomas approved this merge request

    approved this merge request

  • merged

  • Nick Thomas mentioned in commit c4f24a57

    mentioned in commit c4f24a57

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading