# Class TraceServiceOptions (4.4.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [4.4.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.TraceServiceOptions)
- [4.3.1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/4.3.1/Google.Cloud.Diagnostics.AspNetCore.TraceServiceOptions)

    [Obsolete("Use Google.Cloud.Diagnostics.AspNetCore.AspNetCoreTraceOptions instead.")]
    public sealed class TraceServiceOptions

Configuration for initializing tracing.

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) \> TraceServiceOptions

## Inherited Members

[Object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode#system-object-gethashcode) [Object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype#system-object-gettype) [Object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone#system-object-memberwiseclone) [Object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring#system-object-tostring)

## Namespace

[Google.Cloud.Diagnostics.AspNetCore](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore)

## Assembly

Google.Cloud.Diagnostics.AspNetCore.dll

## Properties

### Client

    public TraceServiceClient Client { get; set; }

A client to send traces with. Can be null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Trace.V1/latest/Google.Cloud.Trace.V1.TraceServiceClient.html` |   |

### Options

    public TraceOptions Options { get; set; }

Trace options. Can be null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.TraceOptions.html` |   |

### ProjectId

    public string ProjectId { get; set; }

The Google Cloud Platform project ID. If unspecified and running on GAE or GCE the project
ID will be detected from the platform.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### TraceFallbackPredicate

    public TraceDecisionPredicate TraceFallbackPredicate { get; set; }

A 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. Can be null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.TraceDecisionPredicate` |   |