open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.11k stars 2.39k forks source link

[scraperinttest] Print error logs even if FailOnErrorLogs not specified #36392

Open hughesjj opened 1 week ago

hughesjj commented 1 week ago

Component(s)

No response

Is your feature request related to a problem? Please describe.

Right now, we can only get error logs if we specify scraperinttest.FailOnErrorLogs. This means that, if the test fails, we'll get something like "Condition never satisfied" instead of the root cause

Describe the solution you'd like

Let's take the first half of that conditional and put an else in that just does Logf

Describe alternatives you've considered

Perhaps it's better to always specify FailOnErrorLogs, if so we should document that

Additional context

No response