Uses of Class
codes.grow.packages.datadoglogs.logging.LogRecord
Packages that use LogRecord
Package
Description
Grow Codes SDK for Datadog Log Management.
-
Uses of LogRecord in codes.grow.packages.datadoglogs
Methods in codes.grow.packages.datadoglogs that return LogRecordModifier and TypeMethodDescriptionstatic LogRecordDatadogLogMapping.eventToLogRecord(DatadogLogEvent event) Normalizes a search event into aLogRecord:statusto severity,service/host/env:/version:to the resource, custom attributes plusdatadog.log_idanddatadog.tags; trace ids fromotel.trace_id/otel.span_id, else fromdd.trace_id/dd.span_id(decimal or hex; only the lower 64 bits survive the decimal form).DatadogLogEvent.toLogRecord()Normalizes the event into a log record (seeDatadogLogMapping.eventToLogRecord(codes.grow.packages.datadoglogs.DatadogLogEvent)).DatadogLogsQuery.waitForLog(String query) PollsDatadogLogsQuery.search(java.lang.String, codes.grow.packages.datadoglogs.logging.SearchOptions)until a record matches (intervalDatadogLogsQuery.DEFAULT_POLL_INTERVAL, timeout 30 s).Methods in codes.grow.packages.datadoglogs that return types with arguments of type LogRecordModifier and TypeMethodDescriptionDatadogLogsPage.records()Returns the events normalized to log records.DatadogLogsQuery.waitForLogAsync(String query, WaitForLogOptions options) Methods in codes.grow.packages.datadoglogs with parameters of type LogRecordModifier and TypeMethodDescriptionstatic StringDatadogLogMapping.datadogStatus(LogRecord record) Datadogstatusof a record: its severity text lower-cased, else the canonical severity name.DatadogLogMapping.toDatadogEntry(LogRecord record, DatadogLogsConfig config) Converts a record into a Datadog intake entry.Method parameters in codes.grow.packages.datadoglogs with type arguments of type LogRecordModifier and TypeMethodDescriptionMaps and splits records into intake request bodies (no I/O).DatadogLogExporter.export(List<LogRecord> records, ExportOptions options) Sends the records.DatadogLogsQuery.tail(String query, Consumer<LogRecord> onRecord, TailOptions options) Polling tail: searches everyoptions.interval()for logs matchingqueryfromoptions.start()(default now), oldest first, and callsonRecordonce per log id. -
Uses of LogRecord in codes.grow.packages.datadoglogs.logging
Methods in codes.grow.packages.datadoglogs.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.datadoglogs.logging.SearchOptions)until a record matches the query and the predicate.Methods in codes.grow.packages.datadoglogs.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.datadoglogs.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.datadoglogs.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.datadoglogs.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.datadoglogs.testing.logging
Methods in codes.grow.packages.datadoglogs.testing.logging that return types with arguments of type LogRecordModifier and TypeMethodDescriptionInMemoryLogExporter.records()Accepted records in export order.Methods in codes.grow.packages.datadoglogs.testing.logging with parameters of type LogRecordModifier and TypeMethodDescriptionstatic booleanWhether a record matches a query.Method parameters in codes.grow.packages.datadoglogs.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.datadoglogs.testing.logging with type arguments of type LogRecordModifierConstructorDescriptionInMemoryLogQueryClient(Supplier<List<LogRecord>> source) Reads records from a supplier.