microsoft / microsoft/VFSForGit

Prevent accidental misuse of EventMetadata when logging Exceptions

Open
#968 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

affects: engineering affects: reliability type: enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.