Versions in this module Expand all Collapse all v0 v0.2.0 Dec 3, 2026 Changes in this version + const McpErrorLength + const McpMaxAnswer + const McpMetaClientInfo + const McpMetaProtocolVersion + const McpSessionHeader + const McpSessions + var McpMethods = map[string]string + var McpOutcomes = []string + var McpProps = []string type Client + func (c *Client) Mcp(next http.Handler, options McpOptions) http.Handler + type McpOptions struct + Errors bool + User func(*http.Request) string v0.1.0 Dec 3, 2026 Changes in this version + const Batch + const DefaultEndpoint + const ImportBatch + const MaxPropLength + const MaxProps + const PathAnnotations + const PathEvents + const PathImport + const PathScript + const PathSubscriptions + const ProxyMaxBytes + const ProxyMaxEvents + const ProxyPath + const ResponseTimeSample + const ScriptCacheSeconds + const ScriptRetrySeconds + const SubscriptionsBatch + const TimeoutSeconds + const Version + var Cloudflare = []string + var CrawlerPattern = regexp.MustCompile(...) + var ProxyFields = []string + var ProxyTypes = []string + var SubscriptionIntervals = []string + var SubscriptionStatuses = []string + func ForwardedFor(header string) string + func SetRoute(ctx context.Context, route string) + func SetUser(ctx context.Context, userID string) + func VisitorIP(relay, connecting string) string + type Client struct + func New(options Options) *Client + func (c *Client) Annotation(title, link string, at time.Time) bool + func (c *Client) Begin(r *http.Request) (*http.Request, func(status int, failure any)) + func (c *Client) Close() + func (c *Client) Crawl(status int, visitor Visitor) + func (c *Client) Enabled() bool + func (c *Client) Error(ctx context.Context, name string, props Props) + func (c *Client) Event(ctx context.Context, name string, props Props) + func (c *Client) Exception(ctx context.Context, failure any) + func (c *Client) Finished(status int, took time.Duration, route string, visitor Visitor) + func (c *Client) Flush() bool + func (c *Client) Ignores(raw string) bool + func (c *Client) Import(events []Event) bool + func (c *Client) IsCrawler(userAgent string) bool + func (c *Client) IsProxy(raw string) bool + func (c *Client) Middleware(next http.Handler) http.Handler + func (c *Client) ProxyEvents(raw []byte, visitor Visitor) (int, map[string]any) + func (c *Client) ProxyPath() string + func (c *Client) ProxyScript() (int, http.Header, string) + func (c *Client) Record(event Event, visitor Visitor) + func (c *Client) Revenue(ctx context.Context, name string, amount float64, currency string, props Props) + func (c *Client) ScriptTag() string + func (c *Client) Send(events []Event) bool + func (c *Client) ServeProxy(w http.ResponseWriter, r *http.Request) bool + func (c *Client) Subscription(s Subscription) + func (c *Client) VisitorFromRequest(r *http.Request) Visitor + type Event struct + Automated *bool + IP string + Name string + OwnURL bool + Props Props + Referrer string + Revenue *Revenue + SourceID string + TS string + Type string + URL string + UserAgent string + UserID string + type Options struct + CrawlerPattern *regexp.Regexp + Enabled *bool + Endpoint string + FlushInterval time.Duration + HTTPClient *http.Client + Ignore []string + OnError func(error) + ProxyPath *string + PublicKey string + Random func() float64 + ResponseTimeSample float64 + Route func(*http.Request) string + SecretKey string + Staff func(*http.Request) bool + Timeout time.Duration + Track Track + TrustForwarded bool + User func(*http.Request) string + type Props map[string]any + type Revenue struct + Amount float64 + Currency string + type Subscription struct + Amount float64 + CanceledAt time.Time + ChangedAt time.Time + Currency string + ID string + Interval string + IntervalCount int + Plan string + StartedAt time.Time + Status string + UserID string + type Track struct + NoCrawlers bool + NoExceptions bool + NoNotFound bool + type Visitor struct + IP string + Staff bool + URL string + UserAgent string + UserID string + func VisitorFrom(ctx context.Context) Visitor