Partilhar via


EntityFrameworkEventSource Class

Definition

Caution

Use OpenTelemetry metrics via EntityFrameworkMetricsData instead.

An EventSource emitting Entity Framework performance counter data.

public sealed class EntityFrameworkEventSource : System.Diagnostics.Tracing.EventSource
[System.Obsolete("Use OpenTelemetry metrics via EntityFrameworkMetricsData instead.")]
public sealed class EntityFrameworkEventSource : System.Diagnostics.Tracing.EventSource
type EntityFrameworkEventSource = class
    inherit EventSource
[<System.Obsolete("Use OpenTelemetry metrics via EntityFrameworkMetricsData instead.")>]
type EntityFrameworkEventSource = class
    inherit EventSource
Public NotInheritable Class EntityFrameworkEventSource
Inherits EventSource
Inheritance
EntityFrameworkEventSource
Attributes

Remarks

See EF Core event counters for more information and examples.

Fields

Log

The singleton instance of EntityFrameworkEventSource.

Methods

CompiledQueryCacheHit()

Indicates a hit in the compiled query cache, signifying that query compilation will not need to occur.

CompiledQueryCacheMiss()

Indicates a miss in the compiled query cache, signifying that query compilation will need to occur.

DbContextDisposing()

Indicates that a DbContext instance is being disposed.

DbContextInitializing()

Indicates that a new DbContext instance is being initialized.

ExecutionStrategyOperationFailure()

Indicates that an operation executed by an IExecutionStrategy failed (and may be retried).

OptimisticConcurrencyFailure()

Indicates that an optimistic concurrency failure has occurred.

QueryExecuting()

Indicates that a query is about to begin execution.

SavingChanges()

Indicates that changes are about to be saved.

Applies to