PhoenixAnalytics.Entities.RequestLog (PhoenixAnalytics v0.4.1)

View Source

Represents a log entry for an HTTP request.

This Ecto schema contains various details about an HTTP request, including its unique identifier, method, path, status code, duration, and other metadata.

Summary

Types

Type of device_type used for the request

Duration of the request in milliseconds

Timestamp when the log entry was inserted

HTTP method of the request

Path of the request

Referer URL of the request

IP address of the client

Unique identifier for the request

Unique identifier for the session

Number of page views in the session

HTTP status code of the response

t()

User agent string of the client

Functions

Creates a changeset for RequestLog.

Types

device_type()

@type device_type() :: String.t() | nil

Type of device_type used for the request

duration_ms()

@type duration_ms() :: integer()

Duration of the request in milliseconds

inserted_at()

@type inserted_at() :: NaiveDateTime.t() | nil

Timestamp when the log entry was inserted

method()

@type method() :: String.t()

HTTP method of the request

path()

@type path() :: String.t()

Path of the request

referer()

@type referer() :: String.t() | nil

Referer URL of the request

remote_ip()

@type remote_ip() :: String.t() | nil

IP address of the client

request_id()

@type request_id() :: String.t()

Unique identifier for the request

session_id()

@type session_id() :: String.t() | nil

Unique identifier for the session

session_page_views()

@type session_page_views() :: non_neg_integer() | nil

Number of page views in the session

status_code()

@type status_code() :: non_neg_integer()

HTTP status code of the response

t()

@type t() :: %PhoenixAnalytics.Entities.RequestLog{
  __meta__: term(),
  device_type: device_type(),
  duration_ms: duration_ms(),
  inserted_at: inserted_at(),
  method: method(),
  path: path(),
  referer: referer(),
  remote_ip: remote_ip(),
  request_id: request_id(),
  session_id: session_id(),
  session_page_views: session_page_views(),
  status_code: status_code(),
  user_agent: user_agent()
}

user_agent()

@type user_agent() :: String.t() | nil

User agent string of the client

Functions

changeset(request_log, attrs)

Creates a changeset for RequestLog.