Class ExperimentFetchParams
-
- All Implemented Interfaces:
-
com.braintrustdata.api.core.Params
public final class ExperimentFetchParams implements Params
Fetch the events in an experiment. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the
POST /btqlendpoint.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classExperimentFetchParams.BuilderA builder for ExperimentFetchParams.
-
Method Summary
Modifier and Type Method Description final StringexperimentId()Experiment id final Optional<Long>limit()limit the number of traces fetchedFetch queries may be paginated if the total result size is expected to be large (e.g. final Optional<String>maxRootSpanId()DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit 'cursor' returned by object fetch requests. final Optional<String>maxXactId()DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit 'cursor' returned by object fetch requests. final Optional<String>version()Retrieve a snapshot of events from a past timeThe version id is essentially a filter on the latest event transaction id. final Headers_additionalHeaders()final QueryParams_additionalQueryParams()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. final StringgetPathParam(Integer index)final ExperimentFetchParams.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ExperimentFetchParams.Builderbuilder()Returns a mutable builder for constructing an instance of ExperimentFetchParams. -
-
Method Detail
-
experimentId
final String experimentId()
Experiment id
-
limit
final Optional<Long> limit()
limit the number of traces fetched
Fetch queries may be paginated if the total result size is expected to be large (e.g. project_logs which accumulate over a long time). Note that fetch queries only support pagination in descending time order (from latest to earliest
_xact_id. Furthermore, later pages may return rows which showed up in earlier pages, except with an earlier_xact_id. This happens because pagination occurs over the whole version history of the event log. You will most likely want to exclude any such duplicate, outdated rows (byid) from your combined result set.The
limitparameter controls the number of full traces to return. So you may end up with more individual rows than the specified limit if you are fetching events containing traces.
-
maxRootSpanId
final Optional<String> maxRootSpanId()
DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit 'cursor' returned by object fetch requests. Please prefer the 'cursor' argument going forwards.
Together,
max_xact_idandmax_root_span_idform a pagination cursorSince a paginated fetch query returns results in order from latest to earliest, the cursor for the next page can be found as the row with the minimum (earliest) value of the tuple
(_xact_id, root_span_id). See the documentation oflimitfor an overview of paginating fetch queries.
-
maxXactId
final Optional<String> maxXactId()
DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit 'cursor' returned by object fetch requests. Please prefer the 'cursor' argument going forwards.
Together,
max_xact_idandmax_root_span_idform a pagination cursorSince a paginated fetch query returns results in order from latest to earliest, the cursor for the next page can be found as the row with the minimum (earliest) value of the tuple
(_xact_id, root_span_id). See the documentation oflimitfor an overview of paginating fetch queries.
-
version
final Optional<String> version()
Retrieve a snapshot of events from a past time
The version id is essentially a filter on the latest event transaction id. You can use the
max_xact_idreturned by a past fetch as the version to reproduce that exact fetch.
-
_additionalHeaders
final Headers _additionalHeaders()
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
getPathParam
final String getPathParam(Integer index)
-
toBuilder
final ExperimentFetchParams.Builder toBuilder()
-
builder
final static ExperimentFetchParams.Builder builder()
Returns a mutable builder for constructing an instance of ExperimentFetchParams.
The following fields are required:
.experimentId()
-
-
-
-