Package codes.grow.packages.datadoglogs
Class DatadogLogsFilter
java.lang.Object
codes.grow.packages.datadoglogs.DatadogLogsFilter
- Direct Known Subclasses:
AggregateLogsOptions,SearchLogsRequest
Filter shared by search and aggregate: query (default
*), time window (default
now-15m to now), indexes (default ["*"]) and storage tier (default
indexes).
Times are strings as the API takes them: ISO-8601, epoch milliseconds or date math such as
now-15m; Instant values are sent as ISO-8601 UTC with milliseconds.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDatadogLogsFilter.Builder<B extends DatadogLogsFilter.Builder<B>>Builder of the filter fields. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCopies the filter fields of a builder. -
Method Summary
Modifier and TypeMethodDescriptionReturns the wire form (filterobject).static StringFormats an instant forfrom/to: ISO-8601 UTC with milliseconds.from()Returns the window start.indexes()Returns the indexes to search.query()Returns the Datadog search query.Returns the storage tier.to()Returns the window end.
-
Field Details
-
DEFAULT_FROM
Default lower time bound (date math).- See Also:
-
DEFAULT_TO
Default upper time bound.- See Also:
-
-
Constructor Details
-
DatadogLogsFilter
Copies the filter fields of a builder.- Parameters:
b- builder
-
-
Method Details
-
formatTime
Formats an instant forfrom/to: ISO-8601 UTC with milliseconds.- Parameters:
t- the instant- Returns:
- for example
2026-11-18T12:00:00.000Z
-
query
Returns the Datadog search query.- Returns:
- the query (
*when none was set)
-
from
Returns the window start.- Returns:
- the time string
-
to
Returns the window end.- Returns:
- the time string
-
indexes
Returns the indexes to search.- Returns:
- immutable list
-
storageTier
Returns the storage tier.- Returns:
- the tier
-
filterBody
Returns the wire form (filterobject).- Returns:
- a new map
-