Description
Component(s)
receiver/receivercreator
Is your feature request related to a problem? Please describe.
Hi,
We are currently using the filelog
receiver to scrap console logs and we want to avoid scraping logs which are already sent natively (using OpenTelemetry) by the application to avoid duplicates.
We would like to use the receivercreator
along with the documented annotation hint io.opentelemetry.discovery.logs/enabled
.
However, right now, the fraction of applications sending their logs using otlp protocol is limited and we would like that, by default, the console logs are scraped and only if the annotation io.opentelemetry.discovery.logs/enabled
is set to false
, we don't scrape the console logs.
Describe the solution you'd like
When configuring the receivercreator
for logs, have a way to set the default behavior (i.e. default value for io.opentelemetry.discovery.logs/enabled
).
There's also the case of the corresponding annotation for Prometheus metric scraping (io.opentelemetry.discovery.metrics/enabled
) but in that case it seems less sensible (by default, applications do not expose Prometheus metrics endpoints).
Describe alternatives you've considered
Right now, we are going with a vanilla filelog
receiver connected to a filter
processor and a custom annotation, we filter out the logs for which the annotation is present
Additional context
No response