/// <summary> /// Initialize tracing for this application. /// </summary> /// <param name="application">The Http application.</param> /// <param name="projectId">Optional if running on Google App Engine or Google Compute Engine. /// The Google Cloud Platform project ID. If unspecified and running on GAE or GCE the project ID will be /// detected from the platform.</param> /// <param name="options">Optional trace options, if unset the default will be used.</param> /// <param name="client">Optional trace client, if unset the default will be used.</param> /// <param name="traceFallbackPredicate">Optional function to trace requests. If the trace header is not set /// then this function will be called to determine if a given request should be traced. This will /// not override trace headers.</param> public static void Initialize(HttpApplication application, string projectId = null, TraceOptions options = null, TraceServiceClient client = null, TraceDecisionPredicate traceFallbackPredicate = null) { InitializeInternal(application, projectId, options, client, traceFallbackPredicate); }
/// <summary> /// Create a new <see cref="TraceHeaderTraceOptionsFactory"/> from a <see cref="TraceHeaderContext"/> /// </summary> public TraceOptions CreateOptions(TraceHeaderContext context) { GaxPreconditions.CheckNotNull(context, nameof(context)); return(TraceOptions.Create(context.ShouldTrace)); }