microsoft / microsoft/VFSForGit
Prevent accidental misuse of EventMetadata when logging Exceptions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
See if there's anything that can be done to ensure that issues like #960 don't crop up again.
Can we enforce at compile time that Add(string, Exception) will cause an error?
As an added difficulty, EventMetadata objects can be constructed by passing in the list of <key, value> pairs to the constructor. We should also make sure that any changes we make do not negatively impact performance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate EventMetadata, its Add(string, Exception) API, and the constructor that accepts key/value pairs. Review how these entry points could enforce the requested misuse checks at compile time, then assess their performance impact. Done means the misuse is prevented without negatively affecting construction or logging performance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100