Open andrzej-stencel opened 7 months ago
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
I think since logs are considered Development
stability and this config option is undocumented, I'm going to label as an enhancement, but I agree this is a good idea to support.
As @astencel-sumo pointed out, the initial_delay
option is coming from the scraper helper. The reason this option is available for metrics but not logs is shown when creating the receivers. When creating the metric receiver we're using the scraper helper's receiver, but the logs receiver uses its own internal model of a receiver.
I think the best option is to rely on the existing scraper helper functionality, but code owners (or anyone interested on resolving this) will have to confirm this is possible for logs in this receiver. Adding the initial_delay
configuration option to the README should also be done as a part of this change.
I think the best option is to rely on the existing scraper helper functionality
The scraperhelper package currently only supports metrics, but perhaps it could be extended to also support logs? ๐ค
Adding the initial_delay configuration option to the README should also be done as a part of this change.
๐ฏ agree ๐
The scraperhelper package currently only supports metrics, but perhaps it could be extended to also support logs? ๐ค
My bad, I didn't realize it only supports metrics. In that case, since it's a single (and pretty simple) option, it's not a big deal to implement it in this receiver. If there's some other existing library that we can use it'd be great, but by no means required. ๐
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
Component(s)
receiver/sqlquery
What happened?
Description
The SQL Query receiver supports the
initial_delay
property (it's not documented in the README), but it only works for metrics and not for logs.Steps to Reproduce
Run the collector with the below config and observe collector's logs.
Expected Result
Metrics and logs are first scraped after 5 seconds, then at 10 second intervals.
Actual Result
Metrics collection behavior is correct: first scraped after 5 seconds, then at 10 second intervals.
Logs collection behavior is incorrect: the
initial_delay
of5s
is ignored. Logs are first scraped after 10 seconds and then at 10 second intervals.Collector version
0.90.1
Environment information
Any
OpenTelemetry Collector configuration
Log output
Additional context
This is due to the
initial_delay
being a part of the https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/scraperhelper that the metrics implementation uses internally. To fix this, The logs receiver implementation would need to explicitly add support forinitial_delay
, just as it currently supportscollection_interval
.