Class TracingHook

  • All Implemented Interfaces:
    AutoCloseable, org.eclipse.jgit.transport.ProtocolV2Hook

    public class TracingHook
    extends Object
    implements org.eclipse.jgit.transport.ProtocolV2Hook, AutoCloseable
    Git hook for ls-refs and fetch that enables Gerrit request tracing if the user sets the 'trace' server option.

    This hook is only invoked if Git protocol v2 is used.

    If the 'trace' server option is specified without value, this means without providing a trace ID, a trace ID is generated, but it's not returned to the client. Hence users are advised to always provide a trace ID.

    • Constructor Detail

      • TracingHook

        public TracingHook()
    • Method Detail

      • onLsRefs

        public void onLsRefs​(org.eclipse.jgit.transport.LsRefsV2Request req)
        Specified by:
        onLsRefs in interface org.eclipse.jgit.transport.ProtocolV2Hook
      • onFetch

        public void onFetch​(org.eclipse.jgit.transport.FetchV2Request req)
        Specified by:
        onFetch in interface org.eclipse.jgit.transport.ProtocolV2Hook