# NoProfilingAttribute

Package: [Microsoft.Orleans.Dashboard.Abstractions](/orleans/docs/api/csharp/microsoft.orleans.dashboard.abstractions/) 10.0.0

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.Dashboard.Abstractions)

```csharp
public sealed class NoProfilingAttribute : Attribute
```

Suppresses profiling for grain classes or methods, preventing them from being tracked by the Orleans Dashboard profiler. Apply this attribute to exclude specific grains or methods from performance metrics collection.

## Examples

```csharp
[NoProfiling]
             public class MyInternalGrain : Grain
             {
                 // This entire grain will not be profiled
             }
            
             public class MyGrain : Grain
             {
                 [NoProfiling]
                 public Task InternalMethod()
                 {
                     // This specific method will not be profiled
                 }
             }
```

## Constructors

- [NoProfilingAttribute](/orleans/docs/api/csharp/microsoft.orleans.dashboard.abstractions/orleans.dashboard.noprofilingattribute/constructors/constructor-77e0192b/)
