Skip to content

Modify log scope to use keyvalue pairs #32076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2022

Conversation

cijothomas
Copy link
Contributor

Summary

The scopes example currently uses a plain string. This PR proposes to replace that with a KVP collection, containing the key "TransactionId". This matches the example use case that was described right above the example code snippet.

While Scope can accept any object including string, most backends expect additional enrichments to come in the form of key-value pairs, so this is demonstrating a better practice of using Scopes.

Fixes #Issue_Number (if available)

@dotnet-bot dotnet-bot added this to the October 2022 milestone Oct 28, 2022
@ghost ghost added the community-contribution Indicates PR is created by someone from the .NET community. label Oct 28, 2022
Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tarekgh tarekgh merged commit 4949bbb into dotnet:main Oct 29, 2022
@cijothomas cijothomas deleted the cijothomas/log-scope-fix1 branch October 29, 2022 01:30
cijothomas added a commit to cijothomas/AspNetCore.Docs that referenced this pull request Oct 31, 2022
Rick-Anderson pushed a commit to dotnet/AspNetCore.Docs that referenced this pull request Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community. dotnet-fundamentals/svc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants