Class AbstractGitStepHandler

    • Constructor Detail

      • AbstractGitStepHandler

        public AbstractGitStepHandler()
    • Method Detail

      • searchGitUserName

        public String searchGitUserName​(@Nullable
                                        String credentialsId,
                                        @NonNull
                                        org.jenkinsci.plugins.workflow.job.WorkflowRun run)
      • createSpanBuilder

        @NonNull
        public io.opentelemetry.api.trace.SpanBuilder createSpanBuilder​(@NonNull
                                                                        String gitUrl,
                                                                        @Nullable
                                                                        String gitBranch,
                                                                        @Nullable
                                                                        String credentialsId,
                                                                        @NonNull
                                                                        String stepFunctionName,
                                                                        @NonNull
                                                                        io.opentelemetry.api.trace.Tracer tracer,
                                                                        @NonNull
                                                                        org.jenkinsci.plugins.workflow.job.WorkflowRun run)
        See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
      • sanitizeUrl

        @NonNull
        protected String sanitizeUrl​(@NonNull
                                     org.eclipse.jgit.transport.URIish gitUri)
        Remove the `username` and the `password` params of the URL.

        Example: "https://my_username:my_password@github.com/open-telemetry/opentelemetry-java.git" is sanitized as "https://github.com/open-telemetry/opentelemetry-java.git"

        Parameters:
        gitUri - to sanitize
        Returns:
        sanitized url