public static IHttpClientBuilder AddOutgoingGoogleTraceHandler(this IHttpClientBuilder clientBuilder)
Adds an Google.Cloud.Diagnostics.Common.UnchainedTraceHeaderPropagatingHandler to the HTTP client being built,
which will propagate trace information for outgoing requests, made with this client,
when the request being handled by this server is already being traced.
public static IHttpClientBuilder AddOutgoingGoogleTraceHandler(this IHttpClientBuilder clientBuilder, Func<IServiceProvider, IDictionary<string, string>> labelsProvider)
Adds an Google.Cloud.Diagnostics.Common.UnchainedTraceHeaderPropagatingHandler to the HTTP client being built,
which will propagate trace information for outgoing requests, made with this client,
when the request being handled by this server is already being traced.
A function that provides labels that will be added to the outgoing trace.
The function will be called once per handler, on creation, and the labels obtained at that point will be
used for all subsequent requests made through this handler. Note that the scope of the
IServiceProvider argument will share the lifetime of the handler being created.
May be null, in which case no costum labels will be added to the outgoing trace.
[[["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 details on the \u003ccode\u003eHttpClientBuilderExtensions\u003c/code\u003e class, which offers extension methods for \u003ccode\u003eIHttpClientBuilder\u003c/code\u003e in the \u003ccode\u003eGoogle.Cloud.Diagnostics.Common\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddOutgoingGoogleTraceHandler\u003c/code\u003e method allows you to add a handler to an HTTP client that propagates trace information for outgoing requests when a request is already being traced.\u003c/p\u003e\n"],["\u003cp\u003eAnother overloaded \u003ccode\u003eAddOutgoingGoogleTraceHandler\u003c/code\u003e method allows for the inclusion of custom labels to be added to the outgoing trace through a user provided function.\u003c/p\u003e\n"],["\u003cp\u003eThe document specifies the various inherited members from the base \u003ccode\u003eObject\u003c/code\u003e class, including \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\u003eThis document lists all available versions, including the latest version at 5.2.0, as well as older versions, starting from 5.1.0.\u003c/p\u003e\n"]]],[],null,[]]