Open mikael-carneholm-2-wcar opened 8 months ago
Related to #3234.
I already added MDC usage to the new BomUploadProcessingTaskV2
, we merely need to continue adding MDC wherever it makes sense.
The benefit of using MDC is that it will attach the context variables to all log statements within its scope.
I'm thinking that, specifically for the repository meta analysis, we also want to include the name of the repository to which the request is made.
Current Behavior
In the logs, I can see that the MavenMetaAnalyzer task tails due to invalid URLs formatted with parts of the PURL of a component:
(NB: The DOCTYPE probably stems from a plain HTTP response for a 404 page, but this is just a guess since the URL isn't logged)
It is however impossible to know which component(s) that cause this since the component name isn't logged in the analyze() method. If that would have been logged, one could have inspected+corrected the PURL of the component in the DB and error-traced the chain that led to the invalid PURL.
My suggestion is that:
Steps to Reproduce
Hard to specify, since DTrack doesn't log which component is the root of the cause.
Expected Behavior
"Invalid url: " + url
gets logged"Analyzing " + component
is logged for traceabilityDependency-Track Version
4.10.1
Dependency-Track Distribution
Container Image
Database Server
PostgreSQL
Database Server Version
13.13
Browser
N/A
Checklist