Skip to content

Add event hooks #1

@pilcrowonpaper

Description

@pilcrowonpaper

Add an interface to hook into internal events for logging and analytics. This shouldn't be used for running db queries that always need to succeed.

I'm unsure if it should return error.

type EventHandlerInterface interface {
  HandleEvent(timestamp time.Time, event string, stringTags map[string]string, intTags map[string]int64, boolTags map[string]int64) error
}

Some example events are:

  • signup:created
  • signup:email_address_verification_code_sent
  • signup:email_address_verified
  • signup:password_set
  • signup:completed

It would be nicer to have a method for each event but I'm not sure how that would work if you only wanted to listen to a subset of events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions