> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MonitoringConfiguration

> Configuration for logging, metrics, and health monitoring.

export function DocsBadge({text, variant = 'neutral'}) {
  const variantClasses = {
    success: 'mint-bg-green-500/10 mint-text-green-600 dark:mint-text-green-400 mint-border-green-500/20',
    neutral: 'mint-bg-slate-500/10 mint-text-slate-600 dark:mint-text-slate-400 mint-border-slate-500/20',
    info: 'mint-bg-blue-500/10 mint-text-blue-600 dark:mint-text-blue-400 mint-border-blue-500/20',
    warning: 'mint-bg-amber-500/10 mint-text-amber-600 dark:mint-text-amber-400 mint-border-amber-500/20',
    danger: 'mint-bg-red-500/10 mint-text-red-600 dark:mint-text-red-400 mint-border-red-500/20'
  };
  const classes = variantClasses[variant] || variantClasses.neutral;
  return <span className={`mint-inline-flex mint-items-center mint-px-2 mint-py-0.5 mint-rounded-full mint-text-xs mint-font-medium mint-tracking-wide mint-border mint-ml-1.5 mint-align-middle mint-whitespace-nowrap ${classes}`}>
      {text}
    </span>;
}

## Definition

**Assembly:** Microsoft.OData.Mcp.Core.dll

**Namespace:** Microsoft.OData.Mcp.Core.Configuration

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration
```

## Summary

Configuration for logging, metrics, and health monitoring.

## Remarks

Monitoring configuration controls what information is logged, how metrics
are collected, and what health checks are performed for operational visibility.

## Constructors

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  .ctor

Initializes a new instance of the [MonitoringConfiguration](/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Configuration/MonitoringConfiguration) class.

#### Syntax

```csharp theme={"dark"}
public MonitoringConfiguration()
```

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  .ctor <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Alerting

Gets or sets the alerting configuration.

#### Syntax

```csharp theme={"dark"}
public Microsoft.OData.Mcp.Core.Configuration.AlertingConfiguration Alerting { get; set; }
```

#### Property Value

Type: `Microsoft.OData.Mcp.Core.Configuration.AlertingConfiguration`
Configuration for automated alerts based on metrics and logs.

#### Remarks

Alerting configuration defines when and how to notify operations teams
about system issues or performance degradations.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  ApplicationInsights

Gets or sets the application insights configuration.

#### Syntax

```csharp theme={"dark"}
public Microsoft.OData.Mcp.Core.Configuration.ApplicationInsightsConfiguration ApplicationInsights { get; set; }
```

#### Property Value

Type: `Microsoft.OData.Mcp.Core.Configuration.ApplicationInsightsConfiguration`
Configuration for Azure Application Insights integration.

#### Remarks

Application Insights provides comprehensive application performance
monitoring and analytics for Azure-hosted applications.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  CustomMetrics

Gets or sets the custom metric definitions.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.List<Microsoft.OData.Mcp.Core.Configuration.MetricDefinition> CustomMetrics { get; set; }
```

#### Property Value

Type: `System.Collections.Generic.List<Microsoft.OData.Mcp.Core.Configuration.MetricDefinition>`
A collection of custom metrics to collect.

#### Remarks

Custom metrics allow tracking application-specific measurements
beyond the standard performance metrics.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  CustomProperties

Gets or sets custom monitoring properties.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.Dictionary<string, object> CustomProperties { get; set; }
```

#### Property Value

Type: `System.Collections.Generic.Dictionary<string, object>`
A dictionary of custom monitoring configuration values.

#### Remarks

Custom properties allow extending the configuration with monitoring system-specific
settings that don't fit into the standard configuration properties.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  EnableHealthChecks

Gets or sets a value indicating whether to enable health checks.

#### Syntax

```csharp theme={"dark"}
public bool EnableHealthChecks { get; set; }
```

#### Property Value

Type: `bool`
`true` to enable health check endpoints; otherwise, `false`.

#### Remarks

Health checks provide automated monitoring of service health status
and can be used by load balancers and monitoring systems.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  EnableMetrics

Gets or sets a value indicating whether to enable performance metrics collection.

#### Syntax

```csharp theme={"dark"}
public bool EnableMetrics { get; set; }
```

#### Property Value

Type: `bool`
`true` to collect performance metrics; otherwise, `false`.

#### Remarks

Performance metrics include response times, throughput, error rates,
and other operational metrics useful for monitoring and alerting.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  EnableStructuredLogging

Gets or sets a value indicating whether to enable structured logging.

#### Syntax

```csharp theme={"dark"}
public bool EnableStructuredLogging { get; set; }
```

#### Property Value

Type: `bool`
`true` to enable structured logging; otherwise, `false`.

#### Remarks

Structured logging outputs log messages in a structured format (like JSON)
that can be easily parsed by log aggregation systems.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  EnableTracing

Gets or sets a value indicating whether to enable distributed tracing.

#### Syntax

```csharp theme={"dark"}
public bool EnableTracing { get; set; }
```

#### Property Value

Type: `bool`
`true` to enable distributed tracing; otherwise, `false`.

#### Remarks

Distributed tracing tracks requests across multiple services and provides
end-to-end visibility in microservice architectures.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  HealthCheckInterval

Gets or sets the health check interval.

#### Syntax

```csharp theme={"dark"}
public System.TimeSpan HealthCheckInterval { get; set; }
```

#### Property Value

Type: `System.TimeSpan`
The interval between health check executions.

#### Remarks

More frequent health checks provide faster failure detection but
increase system load.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  HealthCheckTimeout

Gets or sets the health check timeout.

#### Syntax

```csharp theme={"dark"}
public System.TimeSpan HealthCheckTimeout { get; set; }
```

#### Property Value

Type: `System.TimeSpan`
The maximum time to wait for health check completion.

#### Remarks

Health checks that take longer than this timeout will be considered failed.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  LogFilters

Gets or sets the log filters.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.List<Microsoft.OData.Mcp.Core.Configuration.LogFilter> LogFilters { get; set; }
```

#### Property Value

Type: `System.Collections.Generic.List<Microsoft.OData.Mcp.Core.Configuration.LogFilter>`
A collection of filters to apply to log messages.

#### Remarks

Log filters can suppress noisy log messages or enhance logging
for specific components or scenarios.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  LogLevel

Gets or sets the minimum logging level.

#### Syntax

```csharp theme={"dark"}
public string LogLevel { get; set; }
```

#### Property Value

Type: `string`
The minimum level of log messages to record.

#### Remarks

Log levels follow standard .NET logging conventions: Trace, Debug, Information,
Warning, Error, Critical. Lower levels include all higher levels.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  LogRequestResponse

Gets or sets a value indicating whether to log request/response details.

#### Syntax

```csharp theme={"dark"}
public bool LogRequestResponse { get; set; }
```

#### Property Value

Type: `bool`
`true` to log HTTP request and response details; otherwise, `false`.

#### Remarks

Request/response logging provides detailed information about HTTP traffic
but can impact performance and may log sensitive information.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  LogSensitiveData

Gets or sets a value indicating whether to log sensitive data.

#### Syntax

```csharp theme={"dark"}
public bool LogSensitiveData { get; set; }
```

#### Property Value

Type: `bool`
`true` to include sensitive data in logs; otherwise, `false`.

#### Remarks

Sensitive data includes authentication tokens, personal information, and other
confidential data. This should be disabled in production environments.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  MetricsInterval

Gets or sets the metrics collection interval.

#### Syntax

```csharp theme={"dark"}
public System.TimeSpan MetricsInterval { get; set; }
```

#### Property Value

Type: `System.TimeSpan`
The interval between metrics collection cycles.

#### Remarks

More frequent collection provides better visibility but increases overhead.
The optimal interval depends on your monitoring requirements.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  OpenTelemetry

Gets or sets the OpenTelemetry configuration.

#### Syntax

```csharp theme={"dark"}
public Microsoft.OData.Mcp.Core.Configuration.OpenTelemetryConfiguration OpenTelemetry { get; set; }
```

#### Property Value

Type: `Microsoft.OData.Mcp.Core.Configuration.OpenTelemetryConfiguration`
Configuration for OpenTelemetry observability.

#### Remarks

OpenTelemetry provides standardized observability with metrics, logs,
and traces that can be exported to various monitoring systems.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  TracingSamplingRate

Gets or sets the tracing sampling rate.

#### Syntax

```csharp theme={"dark"}
public double TracingSamplingRate { get; set; }
```

#### Property Value

Type: `double`
The percentage of requests to trace (0.0 to 1.0).

#### Remarks

Sampling reduces the overhead of tracing by only capturing a percentage
of requests. A value of 1.0 traces all requests.

## Methods

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  AddCustomMetric

Adds a custom metric definition.

#### Syntax

```csharp theme={"dark"}
public void AddCustomMetric(string name, Microsoft.OData.Mcp.Core.Configuration.MetricType type, string description, string unit = null)
```

#### Parameters

| Name          | Type                                                | Description             |
| ------------- | --------------------------------------------------- | ----------------------- |
| `name`        | `string`                                            | The metric name.        |
| `type`        | `Microsoft.OData.Mcp.Core.Configuration.MetricType` | The metric type.        |
| `description` | `string`                                            | The metric description. |
| `unit`        | `string?`                                           | The metric unit.        |

#### Exceptions

| Exception           | Description                               |
| ------------------- | ----------------------------------------- |
| `ArgumentException` | Thrown when *name* is null or whitespace. |

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  AddLogFilter

Adds a log filter.

#### Syntax

```csharp theme={"dark"}
public void AddLogFilter(string category, string level)
```

#### Parameters

| Name       | Type     | Description                             |
| ---------- | -------- | --------------------------------------- |
| `category` | `string` | The log category to filter.             |
| `level`    | `string` | The minimum log level for the category. |

#### Exceptions

| Exception           | Description                                   |
| ------------------- | --------------------------------------------- |
| `ArgumentException` | Thrown when *category* is null or whitespace. |

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Clone

Creates a copy of this configuration.

#### Syntax

```csharp theme={"dark"}
public Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration Clone()
```

#### Returns

Type: `Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration`
A new instance with the same settings.

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Equals <DocsBadge text="Inherited" variant="neutral" /> <DocsBadge text="Virtual" variant="warning" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name  | Type      | Description |
| ----- | --------- | ----------- |
| `obj` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Equals <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  ForDevelopment

Creates a configuration optimized for development environments.

#### Syntax

```csharp theme={"dark"}
public static Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration ForDevelopment()
```

#### Returns

Type: `Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration`
A monitoring configuration suitable for development.

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  ForProduction

Creates a configuration optimized for production environments.

#### Syntax

```csharp theme={"dark"}
public static Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration ForProduction()
```

#### Returns

Type: `Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration`
A monitoring configuration suitable for production.

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  GetHashCode <DocsBadge text="Inherited" variant="neutral" /> <DocsBadge text="Virtual" variant="warning" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  GetType <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  MemberwiseClone <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  MergeWith

Merges another configuration into this one, with the other configuration taking precedence.

#### Syntax

```csharp theme={"dark"}
public void MergeWith(Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration other)
```

#### Parameters

| Name    | Type                                                             | Description                               |
| ------- | ---------------------------------------------------------------- | ----------------------------------------- |
| `other` | `Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration` | The configuration to merge into this one. |

#### Exceptions

| Exception               | Description                  |
| ----------------------- | ---------------------------- |
| `ArgumentNullException` | Thrown when *other* is null. |

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Minimal

Creates a minimal monitoring configuration.

#### Syntax

```csharp theme={"dark"}
public static Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration Minimal()
```

#### Returns

Type: `Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration`
A monitoring configuration with minimal overhead.

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  ReferenceEquals <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  ToString <DocsBadge text="Inherited" variant="neutral" /> <DocsBadge text="Virtual" variant="warning" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Validate

Validates the monitoring configuration.

#### Syntax

```csharp theme={"dark"}
public System.Collections.Generic.IEnumerable<string> Validate()
```

#### Returns

Type: `System.Collections.Generic.IEnumerable<string>`
A collection of validation errors, or empty if the configuration is valid.
