Skip to content
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

Telemetry Abstractions API Surface #4375

Closed
wants to merge 1 commit into from

Conversation

geeknoid
Copy link
Member

@geeknoid geeknoid commented Sep 7, 2023

Please focus on APIs marked [Experimental]

Microsoft Reviewers: Open in CodeFlow

@danmoseley
Copy link
Member

@JamesNK @noahfalk any remaining feedback here?

using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.DependencyInjection;

namespace Microsoft.Extensions.Telemetry.Enrichment;
Copy link
Member

Choose a reason for hiding this comment

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

I see there are a lot of extension methods on IServiceCollection that aren't in the Microsoft.Extensions.DependencyInjection namespace. That's different to what existing Microsoft.Extensions.* packages which do use Microsoft.Extensions.DependencyInjection.

See dotnet/runtime#86885 as an example where this point came up.

Has this been discussed before? I think you should use Microsoft.Extensions.DependencyInjection unless there is a reason not to.

Comment on lines +25 to +27
public KeyValuePair<string, object?>[] TagArray { get; }
public KeyValuePair<string, object?>[] RedactedTagArray { get; }
public ClassifiedTag[] ClassifiedTagArray { get; }
Copy link
Member

Choose a reason for hiding this comment

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

Returning arrays is odd. Are these intended to be editable? If not then ReadOnlyMemory or ReadOnlySpan would be better.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a helper type for the logging code generator, and not intended to be used by customers directly. The type is documented as such, and the API is marked as EditorBrowsable=Never

@geeknoid
Copy link
Member Author

geeknoid commented Sep 9, 2023

@danmoseley This is intended for the internal R9 API review.

#4373 is intended for the .NET team's commentary on stuff, that's why I added all the .NET folks as reviewers there.

@geeknoid geeknoid closed this Sep 21, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 21, 2023
@RussKie RussKie deleted the geeknoid/telemetry_abstractions branch February 11, 2024 23:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants