Associate Bitbucket Git requests with my app via mesh access log fields

I am a developer of a Bitbucket Data Center plugin that uses the GitScm interface to get data from repositories. As part of ensuring that we can easily trace the requests that our plugin makes to the Bitbucket 8 git mesh, we are interested in setting a request ID, or a unique user, or something, to allow us to easily figure out what operations in the git mesh access log are us, and which ones are not.

I’ve been referencing the “how to read Bitbucket logs” page: How to read the Bitbucket Server Log Formats | Bitbucket Data Center | Atlassian Documentation

One line of the mesh access log when our app does a git operation looks like this (from an atlas-debug setup): | grpc | o@6RKVBCSRx1053x219x2 | - | - | 2024-04-10 17:33:34,103 | "PlumbingService/CallStdin" | bitbucket-atlas-debug | 0 | 3 | 6 | 113 | 158 | - | 11

The two - at the beginning are supposed to be:

  • Bitbucket server request ID
  • username

Does anyone know how to set these from Java code interacting with GitScm?

I also noticed the “labels” field:

  • labels: used in the application to add ‘classifications’ to requests

However, it’s not clear to me how to use that either.