Log detected invalid build trace chunks

Merged Grzegorz Bizon requested to merge feature/gb/invalid-build-trace-chunks-logs into master

What does this MR do?

This merge request makes it possible to log detected invalid build trace chunks.

Our gitlab_ci_trace_operations_total{operatio="invalid"} metric clearly shows that we are seeing this problem with a rate of up to 1 invalid chunk per minute in gitlab-org/gitlab project. It is not clear why this is happening, thus we are adding additional logging mechanism here.


We are not going to send this exception to Sentry, the exception will appear in the exceptions log only if ci_trace_log_invalid_chunks feature flag is enabled for a given project.



See #260310 (closed)

Edited by Grzegorz Bizon