source

package
v0.1.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package source attributes where wrapped logs came from, so usage analytics can answer "where do my logs originate". Detection is deterministic — it reads the wrapped command, never the log content — so a tagged source is ground truth, not a guess. Shared by the `wrap` CLI command and the MCP tool dispatch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(childArgs []string, explicit string) string

Detect attributes where the wrapped logs came from. Priority: explicit value, then the wrapped program's (normalized) name, then "stdin" when there is no command and we genuinely can't tell. Never empty — "stdin" is an honest "we don't know the upstream tool", not a guess dressed up as certainty.

func Metadata

func Metadata(incidentType, src string) map[string]interface{}

Metadata builds the request metadata, omitting empty keys. `src` is effectively always set, so origin is attributed on every call; `incidentType` is only present when supplied.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL