[[["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\u003e\u003ccode\u003eNullManagedTracer\u003c/code\u003e is a managed tracer that does not perform any tracing, designed for scenarios where tracing is not required.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInstance\u003c/code\u003e field provides a static, read-only instance of the \u003ccode\u003eNullManagedTracer\u003c/code\u003e class for easy access and use.\u003c/p\u003e\n"],["\u003cp\u003eMethods like \u003ccode\u003eAnnotateSpan\u003c/code\u003e and \u003ccode\u003eSetStackTrace\u003c/code\u003e within \u003ccode\u003eNullManagedTracer\u003c/code\u003e are designed to do nothing, meaning they have no effect when called.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetCurrentSpanId\u003c/code\u003e and \u003ccode\u003eGetCurrentTraceId\u003c/code\u003e methods always return null, indicating that no span or trace ID is being tracked.\u003c/p\u003e\n"],["\u003cp\u003eThe methods \u003ccode\u003eRunInSpan\u003c/code\u003e, \u003ccode\u003eRunInSpan<T>\u003c/code\u003e, and \u003ccode\u003eRunInSpanAsync<T>\u003c/code\u003e execute the provided action or function without tracing, offering a no-op tracing context for code execution.\u003c/p\u003e\n"]]],[],null,["# Google.Cloud.Diagnostics.Common - Class NullManagedTracer (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.NullManagedTracer)\n- [5.2.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.2.0/Google.Cloud.Diagnostics.Common.NullManagedTracer)\n- [5.1.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.1.0/Google.Cloud.Diagnostics.Common.NullManagedTracer)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.0.0/Google.Cloud.Diagnostics.Common.NullManagedTracer)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.4.0/Google.Cloud.Diagnostics.Common.NullManagedTracer)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.3.1/Google.Cloud.Diagnostics.Common.NullManagedTracer) \n\n public sealed class NullManagedTracer : IManagedTracer\n\nReference documentation and code samples for the Google.Cloud.Diagnostics.Common class NullManagedTracer.\n\nA managed tracer that does not trace. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e NullManagedTracer \n\nImplements\n----------\n\n[IManagedTracer](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.IManagedTracer) \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.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\nFields\n------\n\n### Instance\n\n public static readonly NullManagedTracer Instance\n\nInstance of [NullManagedTracer](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.NullManagedTracer)\n\nMethods\n-------\n\n### AnnotateSpan(Dictionary\\\u003cstring, string\\\u003e)\n\n public void AnnotateSpan(Dictionary\u003cstring, string\u003e labels)\n\nDoes nothing.\n\n### GetCurrentSpanId()\n\n public ulong? GetCurrentSpanId()\n\nAlways returns null.\n\n### GetCurrentTraceId()\n\n public string GetCurrentTraceId()\n\nAlways returns null.\n\n### RunInSpan(Action, string, StartSpanOptions)\n\n public void RunInSpan(Action action, string name, StartSpanOptions options = null)\n\nCalls `action`.\n\n### RunInSpanAsync\\\u003cT\\\u003e(Func\\\u003cTask\\\u003cT\\\u003e\\\u003e, string, StartSpanOptions)\n\n public Task\u003cT\u003e RunInSpanAsync\u003cT\u003e(Func\u003cTask\u003cT\u003e\u003e func, string name, StartSpanOptions options = null)\n\nCalls `func` asynchronously and returns the result.\n\n### RunInSpan\\\u003cT\\\u003e(Func\\\u003cT\\\u003e, string, StartSpanOptions)\n\n public T RunInSpan\u003cT\u003e(Func\u003cT\u003e func, string name, StartSpanOptions options = null)\n\nCalls `func` and returns the result.\n\n### SetStackTrace(StackTrace)\n\n public void SetStackTrace(StackTrace stackTrace)\n\nDoes nothing.\n\n### StartSpan(string, StartSpanOptions)\n\n public ISpan StartSpan(string name, StartSpanOptions options = null)\n\nDoes nothing."]]