Versions in this module Expand all Collapse all v3 v3.0.0 Apr 8, 2024 Changes in this version + const OTLPSeverityNumber + func ParseRequest(logger log.Logger, userID string, r *http.Request, ...) (*logproto.PushRequest, error) + func RetentionPeriodToString(retentionPeriod time.Duration) string + type Action string + const Drop + const IndexLabel + const StructuredMetadata + type AttributesConfig struct + Action Action + Attributes []string + Regex relabel.Regexp + func (c *AttributesConfig) UnmarshalYAML(unmarshal func(interface{}) error) error + type EmptyLimits struct + func (EmptyLimits) OTLPConfig(string) OTLPConfig + type GlobalOTLPConfig struct + DefaultOTLPResourceAttributesAsIndexLabels []string + func (cfg *GlobalOTLPConfig) RegisterFlags(fs *flag.FlagSet) + type Limits interface + OTLPConfig func(userID string) OTLPConfig + type OTLPConfig struct + LogAttributes []AttributesConfig + ResourceAttributes ResourceAttributesConfig + ScopeAttributes []AttributesConfig + func DefaultOTLPConfig(cfg GlobalOTLPConfig) OTLPConfig + func (c *OTLPConfig) ActionForLogAttribute(attribute string) Action + func (c *OTLPConfig) ActionForResourceAttribute(attribute string) Action + func (c *OTLPConfig) ActionForScopeAttribute(attribute string) Action + func (c *OTLPConfig) ApplyGlobalOTLPConfig(config GlobalOTLPConfig) + func (c *OTLPConfig) Validate() error + type RequestParser func(userID string, r *http.Request, tenantsRetention TenantsRetention, ...) (*logproto.PushRequest, *Stats, error) + type RequestParserWrapper func(inner RequestParser) RequestParser + type ResourceAttributesConfig struct + AttributesConfig []AttributesConfig + IgnoreDefaults bool + type Stats struct + BodySize int64 + ContentEncoding string + ContentType string + Errs []error + Extra []any + LogLinesBytes map[time.Duration]int64 + MostRecentEntryTimestamp time.Time + NumLines int64 + ResourceAndSourceMetadataLabels map[time.Duration]push.LabelsAdapter + StreamLabelsSize int64 + StructuredMetadataBytes map[time.Duration]int64 + func ParseLokiRequest(userID string, r *http.Request, tenantsRetention TenantsRetention, _ Limits, ...) (*logproto.PushRequest, *Stats, error) + func ParseOTLPRequest(userID string, r *http.Request, tenantsRetention TenantsRetention, ...) (*logproto.PushRequest, *Stats, error) + type TenantsRetention interface + RetentionPeriodFor func(userID string, lbs labels.Labels) time.Duration + type UsageTracker interface + DiscardedBytesAdd func(ctx context.Context, tenant, reason string, labels labels.Labels, ...) + ReceivedBytesAdd func(ctx context.Context, tenant string, retentionPeriod time.Duration, ...)