dependency-track icon indicating copy to clipboard operation
dependency-track copied to clipboard

Reduce ERROR notifications for certain "normal" metadata scenarios (i.e. 404)

Open valentijnscholten opened this issue 1 year ago • 1 comments

Current Behavior

I noticed that every non 2xx http response code triggers an ERROR notification to be raised for metadata analysis:

https://github.com/DependencyTrack/dependency-track/blob/45982a2e1a12a0b0de17f955b856b27008fee02a/src/main/java/org/dependencytrack/tasks/repositories/AbstractMetaAnalyzer.java#L78-L89

Proposed Behavior

I propose to make this less noisy. The logging is already on DEBUG level, maybe the notification should be on DEBUG as well. At least for 404 which can be quite normal, at least for the Composer Package Repository (#4470) Maybe other 4xx and 5xx errors could/should trigger WARN or ERROR.

Checklist

valentijnscholten avatar Dec 18 '24 09:12 valentijnscholten

+1

I'd like to upvote the resolution of this issue. Currently we have 15k projects in the database and I get ~1000 error email notifications like this EVERY DAY. This is super annoying. Being able to filter out those specific emails would be great.

Example:

Repository Error

--------------------------------------------------------------------------------

Level:     ERROR
Scope:     SYSTEM
Group:     REPOSITORY

--------------------------------------------------------------------------------

An error occurred while communicating with an NUGET repository. URL: https://api.nuget.org/v3/registration5-semver1/microsoft.dotnet.scaffolding.shared/9.0.0.json HTTP Status: 404. Check log for details.

Thank You!

ryhoo2 avatar Jun 05 '25 10:06 ryhoo2

@nscuro please assign it to me. I would like to work on this. I guess, We would need to introduce debug level notification at alpine server module. Please confirm whether we would do it for every repository api call , or only for NuGet as composer repository 404 is already handled.

anantk24 avatar Aug 28 '25 18:08 anantk24