Skip to main content

Event Schemas

Each record in the log contains several fields that are added by default by the Google Logging API and are not useful for Glean usage analysis. The relevant fields are:

type GleanCustomerEvent struct {
// Timestamp of the activity.
Timestamp timestamp

// A unique ID for the record.
insertId string

// All data for the record are contained in this struct field.
jsonPayload *GleanCustomerEventPayload
}

This is an omnibus log that contains many different kinds of events. Each record contains this as its outermost struct field:

type GleanCustomerEventPayload struct {
// The type of the record. Will be one of: SEARCH, AUTOCOMPLETE, CHAT, CHAT_CITATIONS, AI_SUMMARY, AI_ANSWER, SHORTCUT, SEARCH_CLICK, CHAT_CITATION_CLICK,
// CHAT_FEEDBACK, CLIENT_EVENT, SEARCH_FEEDBACK, AI_ANSWER_VOTE, AI_SUMMARY_VOTE, WORKFLOW_RUN, WORKFLOW, GLEAN_BOT_ACTIVITY, PRODUCT_SNAPSHOT,
// LLM_CALL, WORKFLOW_CONVERSATION
Type string

// Whether the record was written in scrubbed mode and contains no PII.
IsScrubbed bool

// Identifies the user taking the action.
User *GleanCustomerEventUserIdentity

// At most one of the following struct fields will be populated
// corresponding to the type indicated in `Type`.
Search *GleanCustomerEventSearch
Autocomplete *GleanCustomerEventAutocomplete
Chat *GleanCustomerEventChat
ChatCitations *GleanCustomerEventChatCitations
AiSummary *GleanCustomerEventAiSummary
AiAnswer *GleanCustomerEventAiAnswer
Shortcut *GleanCustomerEventShortcut
SearchClick *GleanCustomerEventSearchClick
ChatFeedback *GleanCustomerEventChatFeedback
ClientEvent *GleanCustomerEventClientEvent
SearchFeedback *GleanCustomerEventSearchFeedback
AiAnswerVote *GleanCustomerEventAiAnswerVote
AiSummaryVote *GleanCustomerEventAiSummaryVote
ChatCitationClick *GleanCustomerEventChatCitationClick
WorkflowRun *GleanCustomerEventWorkflowRun
Workflow *GleanCustomerWorkflow
GleanBotActivity *GleanCustomerGleanBotActivity
ProductSnapshot *GleanCustomerEventProductSnapshot
LlmCall *GleanCustomerEventLlmCall
WorkflowConversation *GleanCustomerEventWorkflowConversation
}
// Identifies the user taking the action.
type GleanCustomerEventUserIdentity struct {
// Internal unique ID for the user.
UserId string

// Email address of the user. omitted if scrubbed
UserEmail string

// Current department of the user. omitted if scrubbed
Department string

// ID of the user's department
DepartmentId string
}

Event Type Schemas​