Index

public.error_variants

Description

One row per exact stored error variant, identified by (service, exact_error_identifier). Tracks aggregated stats across all occurrences.

Columns

Name Type Default Nullable Children Parents Comment
created_at timestamp with time zone now() false Timestamp when the record was created.
deleted_at timestamp with time zone true Timestamp when the record was deleted. If null, the record is not deleted.
error_grouping_identifier text false BLAKE3 hex of (service, error_source, canonicalized normalized_message) separated by null bytes. Groups related error variants together without using stack trace details.
error_source error_source false Whether the error originated in the backend or frontend.
exact_error_identifier text false BLAKE3 hex of (service, error_source, normalized_message, normalized_stack_trace) separated by null bytes. Uniquely identifies one exact stored error variant within a service.
example_message text false An example raw error message from the first stored occurrence for this exact variant.
example_stack_trace text true An example raw stack trace from the first stored occurrence for this exact variant, if available.
id uuid uuid_generate_v4() false public.error_occurrences A unique, stable identifier for the record.
last_seen_at timestamp with time zone now() false Denormalized timestamp of the most recent occurrence. Updated on each new occurrence.
normalized_message text false The canonicalized message used for exact matching.
normalized_stack_trace text true The canonicalized stack trace used for exact matching, if available.
occurrence_count integer 1 false Denormalized count of error_occurrences rows. Kept in sync on insert and expiry cleanup.
resolved_at timestamp with time zone true Set when the error is acknowledged as fixed. Null means unresolved.
service text false Service slug that reported the error (e.g. main-frontend, cms, quizzes, tmc, example-exercise, headless-lms).
updated_at timestamp with time zone now() false Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger.

Constraints

Name Type Definition
error_variants_created_at_not_null n NOT NULL created_at
error_variants_error_grouping_identifier_not_null n NOT NULL error_grouping_identifier
error_variants_error_source_not_null n NOT NULL error_source
error_variants_exact_error_identifier_not_null n NOT NULL exact_error_identifier
error_variants_example_message_not_null n NOT NULL example_message
error_variants_id_not_null n NOT NULL id
error_variants_last_seen_at_not_null n NOT NULL last_seen_at
error_variants_normalized_message_not_null n NOT NULL normalized_message
error_variants_occurrence_count_not_null n NOT NULL occurrence_count
error_variants_pkey PRIMARY KEY PRIMARY KEY (id)
error_variants_service_exact_error_identifier_deleted_at_key UNIQUE UNIQUE NULLS NOT DISTINCT (service, exact_error_identifier, deleted_at)
error_variants_service_not_null n NOT NULL service
error_variants_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
error_variants_pkey CREATE UNIQUE INDEX error_variants_pkey ON public.error_variants USING btree (id)
error_variants_service_exact_error_identifier_deleted_at_key CREATE UNIQUE INDEX error_variants_service_exact_error_identifier_deleted_at_key ON public.error_variants USING btree (service, exact_error_identifier, deleted_at) NULLS NOT DISTINCT
idx_error_variants_last_seen CREATE INDEX idx_error_variants_last_seen ON public.error_variants USING btree (last_seen_at DESC) WHERE (deleted_at IS NULL)
idx_error_variants_service_grouping_last_seen CREATE INDEX idx_error_variants_service_grouping_last_seen ON public.error_variants USING btree (service, error_grouping_identifier, last_seen_at DESC) WHERE (deleted_at IS NULL)
idx_error_variants_service_source_last_seen CREATE INDEX idx_error_variants_service_source_last_seen ON public.error_variants USING btree (service, error_source, last_seen_at DESC) WHERE (deleted_at IS NULL)

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.error_variants FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls