Class LokiLogStorageRetriever
java.lang.Object
io.jenkins.plugins.opentelemetry.backend.grafana.LokiLogStorageRetriever
- All Implemented Interfaces:
LogStorageRetriever
,Closeable
,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionLokiLogStorageRetriever
(String lokiUrl, boolean disableSslVerifications, Optional<org.apache.http.auth.Credentials> lokiCredentials, Optional<String> lokiTenantId, groovy.text.Template buildLogsVisualizationUrlTemplate, TemplateBindingsProvider templateBindingsProvider, String serviceName, Optional<String> serviceNamespace) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
overallLog
(String jobFullName, int runNumber, String traceId, String spanId, boolean complete, Instant startTime, Instant endTime) stepLog
(String jobFullName, int runNumber, String flowNodeId, String traceId, String spanId, boolean complete, Instant startTime, Instant endTime)
-
Constructor Details
-
LokiLogStorageRetriever
@MustBeClosed public LokiLogStorageRetriever(@Nonnull String lokiUrl, boolean disableSslVerifications, @Nonnull Optional<org.apache.http.auth.Credentials> lokiCredentials, @Nonnull Optional<String> lokiTenantId, @NonNull groovy.text.Template buildLogsVisualizationUrlTemplate, @NonNull TemplateBindingsProvider templateBindingsProvider, @Nonnull String serviceName, @Nonnull Optional<String> serviceNamespace)
-
-
Method Details
-
overallLog
@Nonnull public LogsQueryResult overallLog(@Nonnull String jobFullName, int runNumber, @Nonnull String traceId, @Nonnull String spanId, boolean complete, @Nonnull Instant startTime, @Nullable Instant endTime) - Specified by:
overallLog
in interfaceLogStorageRetriever
- Parameters:
jobFullName
- seeAbstractItem.getFullName()
runNumber
- seeRun.getNumber()
complete
- if true, we claim to be serving the complete log for a build, so implementations should be sure to retrieve final log linesstartTime
- Pipeline run start time. SeeRun.getStartTimeInMillis()
endTime
-null
if the pipeline is still running. SeeRun.getDuration()
-
stepLog
@Nonnull public LogsQueryResult stepLog(@Nonnull String jobFullName, int runNumber, @Nonnull String flowNodeId, @Nonnull String traceId, @Nonnull String spanId, boolean complete, @Nonnull Instant startTime, @Nullable Instant endTime) - Specified by:
stepLog
in interfaceLogStorageRetriever
- Parameters:
jobFullName
- seeAbstractItem.getFullName()
runNumber
- seeRun.getNumber()
flowNodeId
- seeFlowNode.getId()
complete
- if true, we claim to be serving the complete log for a build, so implementations should be sure to retrieve final log linesstartTime
- Pipeline run start time. SeeRun.getStartTimeInMillis()
endTime
-null
if the pipeline is still running. SeeRun.getDuration()
-
checkLokiSetup
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-