Class LokiBuildLogsLineIterator
java.lang.Object
io.jenkins.plugins.opentelemetry.backend.grafana.LokiBuildLogsLineIterator
- All Implemented Interfaces:
LogLineIterator<Long>
,AutoCloseable
,Iterator<LogLine<Long>>
public class LokiBuildLogsLineIterator
extends Object
implements LogLineIterator<Long>, AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jenkins.plugins.opentelemetry.job.log.util.LogLineIterator
LogLineIterator.JenkinsHttpSessionLineBytesToLogLineIdMapper<Id>, LogLineIterator.LogLineBytesToLogLineIdMapper<Id>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLokiBuildLogsLineIterator
(LokiGetJenkinsBuildLogsQueryParameters lokiQueryParameters, org.apache.http.impl.client.CloseableHttpClient httpClient, org.apache.http.protocol.HttpContext httpContext, String lokiUrl, Optional<org.apache.http.auth.Credentials> lokiCredentials, Optional<String> lokiTenantId, io.opentelemetry.api.trace.Tracer tracer) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
MAX_QUERIES
public static final int MAX_QUERIES- See Also:
-
-
Constructor Details
-
LokiBuildLogsLineIterator
public LokiBuildLogsLineIterator(@NonNull LokiGetJenkinsBuildLogsQueryParameters lokiQueryParameters, @NonNull org.apache.http.impl.client.CloseableHttpClient httpClient, @NonNull org.apache.http.protocol.HttpContext httpContext, @NonNull String lokiUrl, @NonNull Optional<org.apache.http.auth.Credentials> lokiCredentials, @NonNull Optional<String> lokiTenantId, @NonNull io.opentelemetry.api.trace.Tracer tracer)
-
-
Method Details
-
loadNextLogLines
- Throws:
IOException
-
loadLogLines
@Nonnull protected Iterator<LogLine<Long>> loadLogLines(InputStream lokiQueryResponseInputStream) throws IOException - Throws:
IOException
-
skipLines
- Specified by:
skipLines
in interfaceLogLineIterator<Long>
-
hasNext
public boolean hasNext() -
next
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-