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<HttpAuthHeaderFactory> httpAuthHeaderFactory, Optional<String> lokiTenantId, groovy.text.Template buildLogsVisualizationUrlTemplate, TemplateBindingsProvider templateBindingsProvider, String serviceName, Optional<String> serviceNamespace) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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<HttpAuthHeaderFactory> httpAuthHeaderFactory, @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(String jobFullName, int runNumber, String traceId, String spanId, boolean complete, Instant startTime, @Nullable Instant endTime) - Specified by:
overallLogin 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-nullif the pipeline is still running. SeeRun.getDuration()
-
stepLog
@Nonnull public LogsQueryResult stepLog(String jobFullName, int runNumber, String flowNodeId, String traceId, String spanId, boolean complete, Instant startTime, @Nullable Instant endTime) - Specified by:
stepLogin 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-nullif the pipeline is still running. SeeRun.getDuration()
-
checkLokiSetup
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-