# JobQueueDepth

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.jobqueuedepth/
> Summary: JobQueueDepth: The number of open jobs in one lane/status pair.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

The number of open jobs in one lane/status pair.

```csharp
public sealed record JobQueueDepth : IEquatable<JobQueueDepth>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.jobqueuedepth/">JobQueueDepth</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;JobQueueDepth&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

Returned by [IJobStore.GetQueueDepthAsync](/api/tracon.ijobstore/#Tracon_IJobStore_GetQueueDepthAsync_System_Threading_CancellationToken_) and published through
the `tracon.job.queue.depth` observable gauge. Only the
**open** statuses are reported — [JobStatus.Pending](/api/tracon.jobstatus/),
[JobStatus.Leased](/api/tracon.jobstatus/), and [JobStatus.Running](/api/tracon.jobstatus/). Terminal
statuses are counted by `tracon.job.executions` instead of by
scanning the table, which ties the cost of this query to the amount of
*outstanding* work rather than to the size of the queue's history.

A pair with no open jobs is not reported; the absence of a row means zero.

## Constructors

### <a id="Tracon_JobQueueDepth__ctor"></a> JobQueueDepth\(\)

```csharp
public JobQueueDepth()
```

## Properties

### <a id="Tracon_JobQueueDepth_Count"></a> Count

The number of jobs in this lane and status.

```csharp
public required long Count { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_JobQueueDepth_Lane"></a> Lane

The lane the jobs belong to. See [JobLanes](/api/tracon.joblanes/).

```csharp
public required string Lane { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_JobQueueDepth_Status"></a> Status

The open status the jobs are in.

```csharp
public required JobStatus Status { get; init; }
```

#### Property Value

 [JobStatus](/api/tracon.jobstatus/)

## Methods

### <a id="Tracon_JobQueueDepth_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_JobQueueDepth_Equals_Tracon_JobQueueDepth_"></a> Equals\(JobQueueDepth?\)

```csharp
public bool Equals(JobQueueDepth? other)
```

#### Parameters

`other` [JobQueueDepth](/api/tracon.jobqueuedepth/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_JobQueueDepth_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_JobQueueDepth_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_JobQueueDepth_op_Equality_Tracon_JobQueueDepth_Tracon_JobQueueDepth_"></a> operator ==\(JobQueueDepth?, JobQueueDepth?\)

```csharp
public static bool operator ==(JobQueueDepth? left, JobQueueDepth? right)
```

#### Parameters

`left` [JobQueueDepth](/api/tracon.jobqueuedepth/)?

`right` [JobQueueDepth](/api/tracon.jobqueuedepth/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_JobQueueDepth_op_Inequality_Tracon_JobQueueDepth_Tracon_JobQueueDepth_"></a> operator \!=\(JobQueueDepth?, JobQueueDepth?\)

```csharp
public static bool operator !=(JobQueueDepth? left, JobQueueDepth? right)
```

#### Parameters

`left` [JobQueueDepth](/api/tracon.jobqueuedepth/)?

`right` [JobQueueDepth](/api/tracon.jobqueuedepth/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
