Class LogEntry.Builder

java.lang.Object
ai.vectros.types.LogEntry.Builder
All Implemented Interfaces:
LogEntry._FinalStage, LogEntry.MethodStage, LogEntry.ResourceStage, LogEntry.StatusStage, LogEntry.TimestampStage
Enclosing class:
LogEntry

  • Method Details

    • from

      public LogEntry.Builder from(LogEntry other)
      Specified by:
      from in interface LogEntry.TimestampStage
    • timestamp

      public LogEntry.MethodStage timestamp(@NotNull @NotNull String timestamp)

      When the API call completed (ISO-8601 UTC).

      When the API call completed (ISO-8601 UTC).

      Specified by:
      timestamp in interface LogEntry.TimestampStage
      Returns:
      Reference to this so that method calls can be chained together.
    • method

      public LogEntry.ResourceStage method(@NotNull @NotNull String method)

      HTTP method of the request.

      HTTP method of the request.

      Specified by:
      method in interface LogEntry.MethodStage
      Returns:
      Reference to this so that method calls can be chained together.
    • resource

      public LogEntry.StatusStage resource(@NotNull @NotNull String resource)

      Top-level resource the call targeted, derived from the request path — for example documents, records, search, schemas, folders, entities, namespaces, users, usage, auth, models, ping, rag, chat, ask, erasure-requests, or export. Rows may also carry values that are not filterable via the resource query parameter, and clients/orgs appear on rows written before those identity surfaces were folded into entities.

      Top-level resource the call targeted, derived from the request path — for example documents, records, search, schemas, folders, entities, namespaces, users, usage, auth, models, ping, rag, chat, ask, erasure-requests, or export. Rows may also carry values that are not filterable via the resource query parameter, and clients/orgs appear on rows written before those identity surfaces were folded into entities.

      Specified by:
      resource in interface LogEntry.ResourceStage
      Returns:
      Reference to this so that method calls can be chained together.
    • status

      public LogEntry._FinalStage status(int status)

      HTTP response status code.

      HTTP response status code.

      Specified by:
      status in interface LogEntry.StatusStage
      Returns:
      Reference to this so that method calls can be chained together.
    • delegationChain

      public LogEntry._FinalStage delegationChain(Nullable<String> delegationChain)

      A JSON-encoded record of who delegated the credential that made this call, present only when the request was made under a key minted via the delegate-mint capability (see POST /v1/admin/keys/scoped). Null for the overwhelming majority of calls, which carry no delegation.

      Specified by:
      delegationChain in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • delegationChain

      public LogEntry._FinalStage delegationChain(String delegationChain)

      A JSON-encoded record of who delegated the credential that made this call, present only when the request was made under a key minted via the delegate-mint capability (see POST /v1/admin/keys/scoped). Null for the overwhelming majority of calls, which carry no delegation.

      Specified by:
      delegationChain in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • delegationChain

      public LogEntry._FinalStage delegationChain(Optional<String> delegationChain)

      A JSON-encoded record of who delegated the credential that made this call, present only when the request was made under a key minted via the delegate-mint capability (see POST /v1/admin/keys/scoped). Null for the overwhelming majority of calls, which carry no delegation.

      Specified by:
      delegationChain in interface LogEntry._FinalStage
    • errorCode

      public LogEntry._FinalStage errorCode(Nullable<String> errorCode)

      Error code explaining WHY a failed call was rejected, when the failure had a typed code — one of RATE_LIMITED, SUBSCRIPTION_LIMIT_EXCEEDED, INSUFFICIENT_BALANCE, RESOURCE_IN_USE, VERSION_CONFLICT, SESSION_REFRESH_REQUIRED, WRITE_FROZEN, UNSUPPORTED_WIRE_VERSION. Null for successful calls, for failures that carry only a message, and for calls recorded before this release that are still within your log retention window. Request and response bodies are never logged, so no further detail is available here by design.

      Specified by:
      errorCode in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • errorCode

      public LogEntry._FinalStage errorCode(String errorCode)

      Error code explaining WHY a failed call was rejected, when the failure had a typed code — one of RATE_LIMITED, SUBSCRIPTION_LIMIT_EXCEEDED, INSUFFICIENT_BALANCE, RESOURCE_IN_USE, VERSION_CONFLICT, SESSION_REFRESH_REQUIRED, WRITE_FROZEN, UNSUPPORTED_WIRE_VERSION. Null for successful calls, for failures that carry only a message, and for calls recorded before this release that are still within your log retention window. Request and response bodies are never logged, so no further detail is available here by design.

      Specified by:
      errorCode in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • errorCode

      public LogEntry._FinalStage errorCode(Optional<String> errorCode)

      Error code explaining WHY a failed call was rejected, when the failure had a typed code — one of RATE_LIMITED, SUBSCRIPTION_LIMIT_EXCEEDED, INSUFFICIENT_BALANCE, RESOURCE_IN_USE, VERSION_CONFLICT, SESSION_REFRESH_REQUIRED, WRITE_FROZEN, UNSUPPORTED_WIRE_VERSION. Null for successful calls, for failures that carry only a message, and for calls recorded before this release that are still within your log retention window. Request and response bodies are never logged, so no further detail is available here by design.

      Specified by:
      errorCode in interface LogEntry._FinalStage
    • requestId

      public LogEntry._FinalStage requestId(Nullable<String> requestId)

      Correlation id for this call. Quote it when contacting support so the call can be traced. Most useful on failures, but recorded for successful calls too. Where an error response body carries a requestId, it is this same id.

      Specified by:
      requestId in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • requestId

      public LogEntry._FinalStage requestId(String requestId)

      Correlation id for this call. Quote it when contacting support so the call can be traced. Most useful on failures, but recorded for successful calls too. Where an error response body carries a requestId, it is this same id.

      Specified by:
      requestId in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • requestId

      public LogEntry._FinalStage requestId(Optional<String> requestId)

      Correlation id for this call. Quote it when contacting support so the call can be traced. Most useful on failures, but recorded for successful calls too. Where an error response body carries a requestId, it is this same id.

      Specified by:
      requestId in interface LogEntry._FinalStage
    • path

      public LogEntry._FinalStage path(String path)

      Full request path.

      Specified by:
      path in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • path

      public LogEntry._FinalStage path(Optional<String> path)

      Full request path.

      Specified by:
      path in interface LogEntry._FinalStage
    • durationMs

      public LogEntry._FinalStage durationMs(Long durationMs)

      Total request duration in milliseconds, from auth to response completion.

      Specified by:
      durationMs in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • durationMs

      public LogEntry._FinalStage durationMs(Optional<Long> durationMs)

      Total request duration in milliseconds, from auth to response completion.

      Specified by:
      durationMs in interface LogEntry._FinalStage
    • keyId

      public LogEntry._FinalStage keyId(Nullable<String> keyId)

      ID of the API key or scoped token that issued the request. Null if the request was unauthenticated (extremely rare — most paths require auth before logging).

      Specified by:
      keyId in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • keyId

      public LogEntry._FinalStage keyId(String keyId)

      ID of the API key or scoped token that issued the request. Null if the request was unauthenticated (extremely rare — most paths require auth before logging).

      Specified by:
      keyId in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • keyId

      public LogEntry._FinalStage keyId(Optional<String> keyId)

      ID of the API key or scoped token that issued the request. Null if the request was unauthenticated (extremely rare — most paths require auth before logging).

      Specified by:
      keyId in interface LogEntry._FinalStage
    • contextId

      public LogEntry._FinalStage contextId(Nullable<String> contextId)

      The app context the request operated under — the context partition the credential carried. * for a root/cross-context caller. Null for older log lines or for entry points that are not context-scoped.

      Specified by:
      contextId in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • contextId

      public LogEntry._FinalStage contextId(String contextId)

      The app context the request operated under — the context partition the credential carried. * for a root/cross-context caller. Null for older log lines or for entry points that are not context-scoped.

      Specified by:
      contextId in interface LogEntry._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • contextId

      public LogEntry._FinalStage contextId(Optional<String> contextId)

      The app context the request operated under — the context partition the credential carried. * for a root/cross-context caller. Null for older log lines or for entry points that are not context-scoped.

      Specified by:
      contextId in interface LogEntry._FinalStage
    • build

      public LogEntry build()
      Specified by:
      build in interface LogEntry._FinalStage
    • additionalProperty

      public LogEntry.Builder additionalProperty(String key, Object value)
      Specified by:
      additionalProperty in interface LogEntry._FinalStage
    • additionalProperties

      public LogEntry.Builder additionalProperties(Map<String,Object> additionalProperties)
      Specified by:
      additionalProperties in interface LogEntry._FinalStage