Documentation
¶
Index ¶
- Variables
- func Configure()
- func Init()
- func IsKubernetesMode() bool
- func IsLocalMode() bool
- func MoleculeUrl(molecule string) string
- func TracePropagation()
- type RLogger
- type SEntry
- type SLabel
- type SLogger
- func (l *SLogger) Error(ctx context.Context, r *http.Request, message string) string
- func (l *SLogger) ErrorErr(ctx context.Context, r *http.Request, message string, err error) string
- func (l *SLogger) ErrorF(ctx context.Context, r *http.Request, format string, a ...interface{}) string
- func (l *SLogger) Flush()
- func (l *SLogger) Info(ctx context.Context, message string)
- func (l *SLogger) InfoF(ctx context.Context, format string, a ...interface{})
- func (l *SLogger) Warning(ctx context.Context, message string)
- func (l *SLogger) WarningF(ctx context.Context, format string, a ...interface{})
- type SServiceContext
- type STimestamp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Port string AppVersion string AppName string Framework string OtlpEndpoint string Mode string Base string MaxNumber int MaxBond int Number int32 Module string Component string )
View Source
var Atoms *element.Atoms
View Source
var HttpClient *http.Client
View Source
var Int64ValueRecorder metric.Int64ValueRecorder
View Source
var Tracer trace.Tracer
Functions ¶
func IsKubernetesMode ¶
func IsKubernetesMode() bool
func IsLocalMode ¶
func IsLocalMode() bool
func MoleculeUrl ¶
func TracePropagation ¶
func TracePropagation()
Types ¶
type RLogger ¶
type RLogger interface {
InfoF(ctx context.Context, format string, a ...interface{})
Info(ctx context.Context, message string)
WarningF(ctx context.Context, format string, a ...interface{})
Warning(ctx context.Context, message string)
Error(ctx context.Context, r *http.Request, message string) string
ErrorErr(ctx context.Context, r *http.Request, message string, err error) string
ErrorF(ctx context.Context, r *http.Request, format string, a ...interface{}) string
Flush()
}
var (
Logger RLogger
)
type SEntry ¶
type SEntry struct {
Severity string `json:"severity,omitempty"`
Message string `json:"message,omitempty"`
Timestamp *STimestamp `json:"timestamp,omitempty"`
Labels *SLabel `json:"logging.googleapis.com/labels,omitempty"`
ServiceContext *SServiceContext `json:"serviceContext,omitempty"`
SpanId string `json:"logging.googleapis.com/spanId,omitempty"`
Trace string `json:"logging.googleapis.com/trace,omitempty"`
TraceSampled bool `json:"logging.googleapis.com/trace_sampled,omitempty"`
}
type SLabel ¶
type SLabel struct {
LoggerName string `json:"loggerName,omitempty"`
}
https://cloud.google.com/logging/docs/agent/configuration#special-fields
type SLogger ¶
type SLogger struct {
// contains filtered or unexported fields
}
func NewSLogger ¶
type SServiceContext ¶
type STimestamp ¶
Click to show internal directories.
Click to hide internal directories.