# MentorTelemetry class

> The MentorTelemetry class of Novior.MentorAgent.Observability: MentorAgent's OpenTelemetry MentorTelemetry.ActivitySource and MentorTelemetry.Meter (roadmap…

- URL: https://docs.mentoragent.net/api/novior-mentoragent-observability/mentortelemetry
- Verified with: MentorAgent 1.2.0
- Last updated: 2026-10-27
- Packages: Novior.MentorAgent

MentorAgent's OpenTelemetry [`MentorTelemetry.ActivitySource`](https://docs.mentoragent.net/api/novior-mentoragent-observability/mentortelemetry#activitysource) and [`MentorTelemetry.Meter`](https://docs.mentoragent.net/api/novior-mentoragent-observability/mentortelemetry#meter) (roadmap \#8), created from `MentorOptions.ObservabilitySourceName`. Registered only when `EnableObservability` is on; the host subscribes with `.AddSource(name).AddMeter(name)` and an exporter (App Insights / Aspire / OTLP). The chat client and embedding generator emit standard GenAI-convention spans/metrics via `UseOpenTelemetry()`; these instruments add MentorAgent-level turn/tool/error spans and counters on top.

## Definition

Namespace: `Novior.MentorAgent.Observability`. Package: `Novior.MentorAgent`.

`public sealed class MentorTelemetry : IDisposable`

```shell
dotnet add package Novior.MentorAgent
```

## Constructors

`public MentorTelemetry(string sourceName)`

## Properties

### `ActivitySource`

`public ActivitySource ActivitySource { get; }`

### `Errors`

`public Counter<long> Errors { get; }`

### `GuardrailBlocks`

`public Counter<long> GuardrailBlocks { get; }`

### `Meter`

`public Meter Meter { get; }`

### `ToolCalls`

`public Counter<long> ToolCalls { get; }`

### `Turns`

`public Counter<long> Turns { get; }`

## Methods

### `Dispose`

`public void Dispose()`

### `StartActivity`

`public Activity? StartActivity(string name)`

Starts a MentorAgent span, or returns `null` when nobody is listening.

---

- Previous: [MentorRemoteAgent class](https://docs.mentoragent.net/api/novior-mentoragent-models/mentorremoteagent.md)
- Next: [MentorAnonymousIdentity enum](https://docs.mentoragent.net/api/novior-mentoragent-options/mentoranonymousidentity.md)
