Documentation ¶
Index ¶
- Constants
- Variables
- func DisableOutput()
- func Init()
- func SubmitFrontendConsoleMessages(ctx context.Context, projectID int, sessionSecureID string, messages string) error
- func SubmitHTTPLog(ctx context.Context, projectID int, lg Log) error
- func SubmitVercelLogs(ctx context.Context, projectID int, logs []VercelLog)
- type Hook
- type Log
- type Message
- type MessageTrace
- type Messages
- type Option
- type PinoLog
- type PinoLogs
- type VercelLog
- type VercelProxy
Constants ¶
View Source
const TimestampFormat = "2006-01-02T15:04:05.000Z"
View Source
const TimestampFormatNano = "2006-01-02T15:04:05.999999999Z"
Variables ¶
View Source
var ( LogSeverityKey = attribute.Key(scout.LogSeverityAttribute) LogMessageKey = attribute.Key(scout.LogMessageAttribute) )
Functions ¶
func DisableOutput ¶
func DisableOutput()
DisableOutput turns off stdout / stderr output from logrus, in case another logger is already used.
Types ¶
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook is a logrus hook that adds logs to the active span as events.
type Message ¶
type Message struct { Type string `json:"type"` Trace []MessageTrace `json:"trace"` Value []string `json:"value"` Time int64 `json:"time"` }
func ParseConsoleMessages ¶
type MessageTrace ¶
type Option ¶
type Option func(h *Hook)
Option applies a configuration to the given config.
func WithLevels ¶
WithLevels sets the logrus logging levels on which the hook is fired.
The default is all levels between logrus.PanicLevel and logrus.WarnLevel inclusive.
type VercelLog ¶
type VercelLog struct { Id string `json:"id"` Message string `json:"message"` Timestamp int64 `json:"timestamp"` Source string `json:"source"` ProjectId string `json:"projectId"` DeploymentId string `json:"deploymentId"` BuildId string `json:"buildId"` Host string `json:"host"` Type string `json:"type"` Entrypoint string `json:"entrypoint"` RequestId string `json:"requestId"` StatusCode int64 `json:"statusCode"` Destination string `json:"destination"` Path string `json:"path"` Proxy VercelProxy `json:"proxy"` }
type VercelProxy ¶
type VercelProxy struct { Timestamp int64 `json:"timestamp"` Method string `json:"method"` Scheme string `json:"scheme"` Host string `json:"host"` Path string `json:"path"` UserAgent []string `json:"userAgent"` Referer string `json:"referer"` StatusCode int64 `json:"statusCode"` ClientIp string `json:"clientIp"` Region string `json:"region"` CacheId string `json:"cacheId"` VercelCache string `json:"vercelCache"` }
Click to show internal directories.
Click to hide internal directories.