[[["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\u003eManagedTracer\u003c/code\u003e class provides functions for creating \u003ccode\u003eIManagedTracer\u003c/code\u003e instances, essential for managing tracing within applications.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eManagedTracer\u003c/code\u003e is 5.2.0, with prior versions 5.1.0, 5.0.0, 4.4.0, and 4.3.1 also available for use.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCreateConsumer\u003c/code\u003e method builds a trace consumer using \u003ccode\u003eTraceServiceClient\u003c/code\u003e and \u003ccode\u003eTraceOptions\u003c/code\u003e, which are required parameters for operation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateDelegatingTracer\u003c/code\u003e method lets you create an \u003ccode\u003eIManagedTracer\u003c/code\u003e that delegates its calls to another \u003ccode\u003eIManagedTracer\u003c/code\u003e, which is provided by a function.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCreateFactory\u003c/code\u003e function generates an \u003ccode\u003eIManagedTracer\u003c/code\u003e from an \u003ccode\u003eITraceContext\u003c/code\u003e, given a project ID, trace consumer, and trace options.\u003c/p\u003e\n"]]],[],null,["# Google.Cloud.Diagnostics.Common - Class ManagedTracer (5.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.3.0 (latest)](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ManagedTracer)\n- [5.2.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.2.0/Google.Cloud.Diagnostics.Common.ManagedTracer)\n- [5.1.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.1.0/Google.Cloud.Diagnostics.Common.ManagedTracer)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.0.0/Google.Cloud.Diagnostics.Common.ManagedTracer)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.4.0/Google.Cloud.Diagnostics.Common.ManagedTracer)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.3.1/Google.Cloud.Diagnostics.Common.ManagedTracer) \n\n public static class ManagedTracer\n\nReference documentation and code samples for the Google.Cloud.Diagnostics.Common class ManagedTracer.\n\nFunctions to create [IManagedTracer](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.IManagedTracer)s. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ManagedTracer \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Diagnostics.Common](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common)\n\nAssembly\n--------\n\nGoogle.Cloud.Diagnostics.Common.dll\n\nMethods\n-------\n\n### CreateConsumer(TraceServiceClient, TraceOptions)\n\n public static IConsumer\u003cTrace\u003e CreateConsumer(TraceServiceClient client, TraceOptions options)\n\nCreates a trace consumer for a [TraceServiceClient](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Trace.V1/latest/Google.Cloud.Trace.V1.TraceServiceClient.html) and options.\n\n### CreateDelegatingTracer(Func\\\u003cIManagedTracer\\\u003e)\n\n public static IManagedTracer CreateDelegatingTracer(Func\u003cIManagedTracer\u003e tracerFactory)\n\nCreates an [IManagedTracer](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.IManagedTracer) that delegates all calls to another [IManagedTracer](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.IManagedTracer)\nthat is retrieved from the given function on each method call.\n\n### CreateFactory(string, IConsumer\\\u003cTrace\\\u003e, TraceOptions)\n\n public static Func\u003cITraceContext, IManagedTracer\u003e CreateFactory(string projectId, IConsumer\u003cTrace\u003e consumer, TraceOptions options)\n\nCreate a factory to generate an [IManagedTracer](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.IManagedTracer) from an [ITraceContext](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ITraceContext)."]]