Skip to content

FakeLogRecord should expose a dictionary of its tags #4637

Closed

Description

Right now, the FakeLogRecord exposes the StructuredState property that returns the record's set of name/value pairs. This is not particularly convenient for tests that want to probe whether a record contains a particular tag with a particular value.

FakeLogRecord could expose a dictionary to make test code easier to write. Alternatively, instead of expose a dictionary, it could expose a MatchTag(string tagName, object? tagValue) method that test code can assert on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

area-telemetryenhancementThis issue represents an ask for new feature or an enhancement to an existing one

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions