// X-Forwarded-For header may have 2 or more comma-separated addresses: the 2nd (and additional) are typically appended by proxies which handled the traffic.
// Therefore, if the header is included, only log the first address
// It's difficult to calculate these values inline when we process the payload because promotion of resource attributes or log attributes to labels can change the stream with each entry.
// So for simplicity and because this logging is typically disabled, we iterate on the entries to calculate these values here.
// X-Forwarded-For header may have 2 or more comma-separated addresses: the 2nd (and additional) are typically appended by proxies which handled the traffic.
// Therefore, if the header is included, only log the first address
f.BoolVar(&cfg.LogStreamCreation,"operation-config.log-stream-creation",false,"Log every new stream created by a push request (very verbose, recommend to enable via runtime config only).")
f.BoolVar(&cfg.LogPushRequest,"operation-config.log-push-request",false,"Log every push request (very verbose, recommend to enable via runtime config only).")
f.BoolVar(&cfg.LogHashOfLabels,"operation-config.log-hash-of-labels",false,"Log a commutative hash of the labels for all streams in a push request. In some cases this can potentially be used as an identifier of the agent sending the stream. Calculating hashes is epensive so only enable as needed.")
f.BoolVar(&cfg.LogPushRequestStreams,"operation-config.log-push-request-streams",false,"Log every stream in a push request (very verbose, recommend to enable via runtime config only).")
f.Var((*flagext.StringSlice)(&cfg.FilterPushRequestStreamsIPs),"operation-config.filter-push-request-streams-ips","Only show streams that match a provided IP address, LogPushRequestStreams must be enabled. Can be used multiple times to filter by multiple IPs.")
f.BoolVar(&cfg.LogServiceNameDiscovery,"operation-config.log-service-name-discovery",false,"Log service name discovery (very verbose, recommend to enable via runtime config only).")
f.BoolVar(&cfg.LogDuplicateMetrics,"operation-config.log-duplicate-metrics",false,"Log metrics for duplicate lines received.")
f.BoolVar(&cfg.LogDuplicateStreamInfo,"operation-config.log-duplicate-stream-info",false,"Log stream info for duplicate lines received")
f.BoolVar(&cfg.LimitedLogPushErrors,"operation-config.limited-log-push-errors",true,"Log push errors with a rate limited logger, will show client push errors without overly spamming logs.")