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, HUMAN_ONLY_CHAT_MESSAGE, VOICE_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, ACTION, ARTIFACT, WORKFLOW_RUN, WORKFLOW_CONVERSATION,
// WORKFLOW_CLASSIFICATION, LLM_CALL, MCP_USAGE, WORKFLOW, GLEAN_BOT_ACTIVITY, PRODUCT_SNAPSHOT.
// WORKFLOW is deprecated.
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
ChatMessage *GleanCustomerEventHumanOnlyChatMessage
VoiceChat *GleanCustomerEventVoiceChat
ChatCitations *GleanCustomerEventChatCitations
AiSummary *GleanCustomerEventAiSummary
AiAnswer *GleanCustomerEventAiAnswer
Shortcut *GleanCustomerEventShortcut
SearchClick *GleanCustomerEventSearchClick
ChatFeedback *GleanCustomerEventChatFeedback
ClientEvent *GleanCustomerEventClientEvent
SearchFeedback *GleanCustomerEventSearchFeedback
AiAnswerVote *GleanCustomerEventAiAnswerVote
AiSummaryVote *GleanCustomerEventAiSummaryVote
ChatCitationClick *GleanCustomerEventChatCitationClick
Action *GleanCustomerEventAction
Artifact *GleanCustomerEventArtifact
WorkflowRun *GleanCustomerEventWorkflowRun
WorkflowConversation *GleanCustomerEventWorkflowConversation

// Emitted by the Python classification pipeline. In the raw JSON log the key
// is lowercase: `workflowclassification`.
WorkflowClassification *GleanCustomerEventWorkflowClassification

Workflow *GleanCustomerWorkflow
GleanBotActivity *GleanCustomerGleanBotActivity
ProductSnapshot *GleanCustomerEventProductSnapshot
LlmCall *GleanCustomerEventLlmCall
McpUsage *GleanCustomerEventMcpUsage
}
note

Glean writes this log from three emitters: a Go service, a Java service, and a Python batch pipeline that emits only WORKFLOW_CLASSIFICATION. A few field names differ between them, and each emitter only produces a subset of the event types. Where a name differs, the schemas below record both spellings.

// Identifies the user taking the action.
type GleanCustomerEventUserIdentity struct {
// Internal unique ID for the user.
UserId string

// Internal ID used to attribute the activity for billing.
// Only emitted by the Go service.
BillingUserId 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 int32
}

Event Type Schemas

Was this page helpful?
On this page