# Google.Cloud.Diagnostics.AspNetCore3 - Interface ICloudTraceNameProvider (5.3.0)

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

- [5.3.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore3/latest/Google.Cloud.Diagnostics.AspNetCore3.ICloudTraceNameProvider)
- [5.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore3/5.2.0/Google.Cloud.Diagnostics.AspNetCore3.ICloudTraceNameProvider)
- [5.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore3/5.1.0/Google.Cloud.Diagnostics.AspNetCore3.ICloudTraceNameProvider)
- [5.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore3/5.0.0/Google.Cloud.Diagnostics.AspNetCore3.ICloudTraceNameProvider)
- [4.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore3/4.4.0/Google.Cloud.Diagnostics.AspNetCore3.ICloudTraceNameProvider)
- [4.3.1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore3/4.3.1/Google.Cloud.Diagnostics.AspNetCore3.ICloudTraceNameProvider)

    public interface ICloudTraceNameProvider

Reference documentation and code samples for the Google.Cloud.Diagnostics.AspNetCore3 interface ICloudTraceNameProvider.

Interface for implementing providers that can name trace spans

## Namespace

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

## Assembly

Google.Cloud.Diagnostics.AspNetCore3.dll

## Methods

### GetTraceNameAsync(HttpContext)

    Task<string> GetTraceNameAsync(HttpContext httpContext)

When overriden in an implementing class it will return the name of the trace span based off the content
in the HttpContext

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `httpContext` | `https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.http.httpcontext` The current request's HttpContext |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://learn.microsoft.com/dotnet/api/system.string` | A string with the name of the trace |