A dictionary of log entry labels.
Keys and values added to labels should not be null.
If they are, an exception will be throw when attempting to log an entry.
The entry won't be logged and the exception will be propagated depending
on the value of ExceptionHandling.
[[["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\u003eEnvironmentNameLogEntryLabelProvider\u003c/code\u003e class, found in the \u003ccode\u003eGoogle.Cloud.Diagnostics.AspNetCore\u003c/code\u003e namespace, is an implementation of \u003ccode\u003eILogEntryLabelProvider\u003c/code\u003e that adds the environment name to log entry labels.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eObject\u003c/code\u003e and implements the \u003ccode\u003eILogEntryLabelProvider\u003c/code\u003e interface.\u003c/p\u003e\n"],["\u003cp\u003eThe constructor \u003ccode\u003eEnvironmentNameLogEntryLabelProvider(IHostingEnvironment)\u003c/code\u003e initializes a new instance, taking an \u003ccode\u003eIHostingEnvironment\u003c/code\u003e instance to get the environment name.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInvoke\u003c/code\u003e method allows users to add to a provided dictionary of log entry labels.\u003c/p\u003e\n"],["\u003cp\u003eThe current latest version of this API is 4.4.0, while version 4.3.1 is also available.\u003c/p\u003e\n"]]],[],null,["# Class EnvironmentNameLogEntryLabelProvider (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.EnvironmentNameLogEntryLabelProvider)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/4.3.1/Google.Cloud.Diagnostics.AspNetCore.EnvironmentNameLogEntryLabelProvider) \n\n public class EnvironmentNameLogEntryLabelProvider : ILogEntryLabelProvider, ILogEntryLabelProvider\n\nA [ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider) implementation which adds the [EnvironmentName](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.hosting.ihostingenvironment.environmentname#microsoft-aspnetcore-hosting-ihostingenvironment-environmentname) to the log entry labels. \n\nInheritance\n-----------\n\n[Object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e EnvironmentNameLogEntryLabelProvider \n\nImplements\n----------\n\n[ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider), [ILogEntryLabelProvider](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ILogEntryLabelProvider.html) \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\nConstructors\n------------\n\n### EnvironmentNameLogEntryLabelProvider(IHostingEnvironment)\n\n public EnvironmentNameLogEntryLabelProvider(IHostingEnvironment hostingEnvironment)\n\nInitializes a new instance of the [EnvironmentNameLogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.EnvironmentNameLogEntryLabelProvider) class.\n\nMethods\n-------\n\n### Invoke(Dictionary\\\u003cString, String\\\u003e)\n\n public void Invoke(Dictionary\u003cstring, string\u003e labels)\n\nInvokes the provider to augment log entry labels."]]