Class AbstractGitStepHandler
java.lang.Object
io.jenkins.plugins.opentelemetry.job.step.AbstractGitStepHandler
- All Implemented Interfaces:
StepHandler
,Comparable<StepHandler>
- Direct Known Subclasses:
GitCheckoutStepHandler
,GitStepHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.api.trace.SpanBuilder
createSpanBuilder
(String gitUrl, String gitBranch, String credentialsId, String stepFunctionName, io.opentelemetry.api.trace.Tracer tracer, 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-Protocolsprotected io.opentelemetry.api.trace.SpanBuilder
createSpanBuilderFromGitDetails
(String gitUrl, String gitBranch, String gitUserName, String stepFunctionName, io.opentelemetry.api.trace.Tracer tracer) Visible for testing.protected String
sanitizeUrl
(org.eclipse.jgit.transport.URIish gitUri) Remove the `username` and the `password` params of the URL.searchGitUserName
(String credentialsId, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jenkins.plugins.opentelemetry.job.step.StepHandler
afterSpanCreated, canCreateSpanBuilder, compareTo, createSpanBuilder, ordinal
-
Constructor Details
-
AbstractGitStepHandler
public AbstractGitStepHandler()
-
-
Method Details
-
searchGitUserName
-
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 -
createSpanBuilderFromGitDetails
protected io.opentelemetry.api.trace.SpanBuilder createSpanBuilderFromGitDetails(@Nullable String gitUrl, @Nullable String gitBranch, @Nullable String gitUserName, @NonNull String stepFunctionName, @NonNull io.opentelemetry.api.trace.Tracer tracer) Visible for testing. UsercreateSpanBuilder(String, String, String, String, Tracer, WorkflowRun)
instead of this method -
sanitizeUrl
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
-