public static IServiceCollection TryAddGoogleTraceContextProvider(this IServiceCollection services)
Adds the services needed for obtaining the trace context from Google's own trace header,
but only if no other trace context provider is registered.
If you are using AddGoogleTraceForAspNetCore(IServiceCollection, AspNetCoreTraceOptions)
you don't need to call this method. Only use this method if you want to extract the trace context
information from Google's own header for your own code to use, or if you are not using the tracing
component of this library but are using the logging component and want the trace context information
to be associated with the log entries.
[[["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\u003eThis document provides reference documentation for the \u003ccode\u003eAspNetCoreTraceExtensions\u003c/code\u003e class within the \u003ccode\u003eGoogle.Cloud.Diagnostics.AspNetCore3\u003c/code\u003e namespace, detailing its role in Google Cloud Trace configuration for ASP.NET Core applications.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddGoogleTraceForAspNetCore\u003c/code\u003e method configures Google Cloud Tracing for ASP.NET Core applications, allowing customization through \u003ccode\u003eAspNetCoreTraceOptions\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTryAddGoogleTraceContextProvider\u003c/code\u003e method adds services to extract trace context from Google's trace header, primarily for logging or custom trace handling when not using \u003ccode\u003eAddGoogleTraceForAspNetCore\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAspNetCoreTraceExtensions\u003c/code\u003e class inherits from the \u003ccode\u003eobject\u003c/code\u003e class and includes inherited members such as \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, \u003ccode\u003eMemberwiseClone\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version for this class is 5.2.0, with previous versions including 5.1.0, 5.0.0, 4.4.0, and 4.3.1 also documented in this reference.\u003c/p\u003e\n"]]],[],null,[]]