Uses of Class
codes.grow.packages.loki.logging.LogRecord
Packages that use LogRecord
Package
Description
Grow Codes SDK for Grafana Loki.
-
Uses of LogRecord in codes.grow.packages.loki
Methods in codes.grow.packages.loki that return LogRecordModifier and TypeMethodDescriptionstatic LogRecordLokiLogQueryClient.toLogRecord(Map<String, String> labels, StreamEntry entry) Converts one Loki entry to a normalizedLogRecord.Method parameters in codes.grow.packages.loki with type arguments of type LogRecordModifier and TypeMethodDescriptionLokiLogExporter.export(List<LogRecord> records, ExportOptions options) LokiOtlpExporter.export(List<LogRecord> records, ExportOptions options) voidPushes records as OTLP/JSON toPOST /otlp/v1/logs(Loki's OTLP endpoint).voidPushes records as OTLP/JSON, optionally gzip-compressed.LokiClient.pushOtlpAsync(List<LogRecord> records, boolean gzip) AsynchronousLokiClient.pushOtlp(List, boolean).static List<LokiStream> LokiLogExporter.recordsToStreams(List<LogRecord> records, CardinalityGuard guard) Converts records into Loki streams; records with the same final label set share a stream.LokiLogQueryClient.tail(String query, Consumer<LogRecord> onRecord, TailOptions options) Live tail over the WebSocket API. -
Uses of LogRecord in codes.grow.packages.loki.logging
Methods in codes.grow.packages.loki.logging that return LogRecordModifier and TypeMethodDescriptionLogRecord.Builder.build()Builds the record.static LogRecordParses one record from JSON text.static LogRecordLogRecordJson.fromJsonNode(com.fasterxml.jackson.databind.JsonNode node) Parses one record from a Jackson tree.Returns a redacted copy of the record.default LogRecordLogQueryClient.waitForLog(String query) LogQueryClient.waitForLog(String, WaitForLogOptions)with defaults.default LogRecordLogQueryClient.waitForLog(String query, WaitForLogOptions options) PollsLogQueryClient.search(java.lang.String, codes.grow.packages.loki.logging.SearchOptions)until a record matches the query and the predicate.Methods in codes.grow.packages.loki.logging that return types with arguments of type LogRecordModifier and TypeMethodDescriptionBatchOptions.onDrop()Drop callback.BatchOptions.onError()Export error callback.WaitForLogOptions.predicate()Returns the value of thepredicaterecord component.LogSearchResult.records()Returns the value of therecordsrecord component.default CompletableFuture<LogRecord> LogQueryClient.waitForLogAsync(String query, WaitForLogOptions options) AsynchronousLogQueryClient.waitForLog(String, WaitForLogOptions).Methods in codes.grow.packages.loki.logging with parameters of type LogRecordModifier and TypeMethodDescriptionbooleanQueues a record.static intReturns the UTF-8 size of the record's JSON form (the unit ofmaxBatchBytes).Returns a redacted copy of the record.static StringSerialises a record to compact JSON.Returns the wire form as an ordered map of plain JSON values.Method parameters in codes.grow.packages.loki.logging with type arguments of type LogRecordModifier and TypeMethodDescriptionLogExporter.export(List<LogRecord> records, ExportOptions options) Exports a batch.static LogSearchResultA single page without cursor or total.BatchOptions.Builder.onDrop(BiConsumer<List<LogRecord>, DropReason> onDrop) Sets the drop callback (exceptions it throws are ignored).BatchOptions.Builder.onError(BiConsumer<Throwable, List<LogRecord>> onError) Sets the export error callback (exceptions it throws are ignored).default TailHandleLogQueryClient.tail(String query, Consumer<LogRecord> onRecord, TailOptions options) Streams new matching records toonRecorduntil the handle is stopped.WaitForLogOptions.withPredicate(Predicate<LogRecord> filter) Copy with a predicate.Constructor parameters in codes.grow.packages.loki.logging with type arguments of type LogRecordModifierConstructorDescriptionLogSearchResult(List<LogRecord> records, Optional<String> nextCursor, OptionalLong total) Copies the list and replacesnulloptionals by empty ones.WaitForLogOptions(Duration timeout, Duration interval, Predicate<LogRecord> predicate, SearchOptions search) Fills defaults fornullvalues. -
Uses of LogRecord in codes.grow.packages.loki.testing.logging
Methods in codes.grow.packages.loki.testing.logging that return types with arguments of type LogRecordModifier and TypeMethodDescriptionInMemoryLogExporter.records()Accepted records in export order.Methods in codes.grow.packages.loki.testing.logging with parameters of type LogRecordModifier and TypeMethodDescriptionstatic booleanWhether a record matches a query.Method parameters in codes.grow.packages.loki.testing.logging with type arguments of type LogRecordModifier and TypeMethodDescriptionvoidInMemoryLogExporter.enqueueOutcome(Function<List<LogRecord>, CompletableFuture<ExportResult>> outcome) Scripts the outcome of the next export call (FIFO).InMemoryLogExporter.export(List<LogRecord> batch, ExportOptions options) voidStores records as if exported (for outcomes that accept part of a batch).InMemoryLogQueryClient.tail(String query, Consumer<LogRecord> onRecord, TailOptions options) Constructor parameters in codes.grow.packages.loki.testing.logging with type arguments of type LogRecordModifierConstructorDescriptionInMemoryLogQueryClient(Supplier<List<LogRecord>> source) Reads records from a supplier.