[Obsolete("Use equivalent extension methods defined in Google.Cloud.Diagnostics.Common.LoggingExtensions instead.")]public static class LabelProviderExtensions
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eLabelProviderExtensions\u003c/code\u003e class provides extension methods for registering \u003ccode\u003eILogEntryLabelProvider\u003c/code\u003e implementations within a service collection.\u003c/p\u003e\n"],["\u003cp\u003eThis class is marked as obsolete, and users should utilize the equivalent extension methods in \u003ccode\u003eGoogle.Cloud.Diagnostics.Common.LoggingExtensions\u003c/code\u003e instead.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddLogEntryLabelProvider<T>\u003c/code\u003e method allows adding an \u003ccode\u003eILogEntryLabelProvider\u003c/code\u003e of type \u003ccode\u003eT\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e, offering flexibility in providing the instance or using a factory.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this documentation for the class is 4.4.0, where users can find more information about the \u003ccode\u003eLabelProviderExtensions\u003c/code\u003e and its associated methods.\u003c/p\u003e\n"]]],[],null,["# Class LabelProviderExtensions (4.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.LabelProviderExtensions)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/4.3.1/Google.Cloud.Diagnostics.AspNetCore.LabelProviderExtensions) \n\n [Obsolete(\"Use equivalent extension methods defined in Google.Cloud.Diagnostics.Common.LoggingExtensions instead.\")]\n public static class LabelProviderExtensions\n\nProvides extension methods to register [ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider) implementations. \n\nInheritance\n-----------\n\n[Object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e LabelProviderExtensions \n\nInherited Members\n-----------------\n\n[Object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode#system-object-gethashcode) \n[Object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype#system-object-gettype) \n[Object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone#system-object-memberwiseclone) \n[Object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring#system-object-tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Diagnostics.AspNetCore](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore)\n\nAssembly\n--------\n\nGoogle.Cloud.Diagnostics.AspNetCore.dll\n\nMethods\n-------\n\n### AddLogEntryLabelProvider\\\u003cT\\\u003e(IServiceCollection)\n\n [Obsolete(\"Use equivalent extension method defined in Google.Cloud.Diagnostics.Common.LoggingExtensions instead.\")]\n public static IServiceCollection AddLogEntryLabelProvider\u003cT\u003e(this IServiceCollection serivces)\n where T : class, ILogEntryLabelProvider\n\nAdds a [ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider) of type `T` to the service collection instance.\n\n### AddLogEntryLabelProvider\\\u003cT\\\u003e(IServiceCollection, T)\n\n [Obsolete(\"Use equivalent extension method defined in Google.Cloud.Diagnostics.Common.LoggingExtensions instead.\")]\n public static IServiceCollection AddLogEntryLabelProvider\u003cT\u003e(this IServiceCollection serivces, T instance)\n where T : class, ILogEntryLabelProvider\n\nAdds a [ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider) of type `T` to the service collection instance.\n\n### AddLogEntryLabelProvider\\\u003cT\\\u003e(IServiceCollection, Func\\\u003cIServiceProvider, T\\\u003e)\n\n [Obsolete(\"Use equivalent extension method defined in Google.Cloud.Diagnostics.Common.LoggingExtensions instead.\")]\n public static IServiceCollection AddLogEntryLabelProvider\u003cT\u003e(this IServiceCollection serivces, Func\u003cIServiceProvider, T\u003e implementationFactory)\n where T : class, ILogEntryLabelProvider\n\nAdds a [ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider) of type `T` to the service collection instance."]]