示例#1
0
        public AspNetCoreDiagnosticOptions()
        {
            // We create separate spans for MVC actions & results so we don't need these additional events by default.
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeOnResourceExecuting");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeOnActionExecution");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeOnActionExecuting");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterOnActionExecuting");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeActionMethod");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeControllerActionMethod");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterControllerActionMethod");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterActionMethod");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeOnActionExecuted");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterOnActionExecuted");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterOnActionExecution");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeOnActionExecuted");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterOnActionExecuted");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterOnActionExecution");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeOnResultExecuting");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterOnResultExecuting");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeOnResultExecuted");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterOnResultExecuted");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.BeforeOnResourceExecuted");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterOnResourceExecuted");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.AfterOnResourceExecuting");

            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.Razor.BeginInstrumentationContext");
            IgnoredEvents.Add("Microsoft.AspNetCore.Mvc.Razor.EndInstrumentationContext");
        }
 public EntityFrameworkCoreDiagnosticOptions()
 {
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.ChangeTracking.StartedTracking");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.ChangeTracking.DetectChangesStarting");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.ChangeTracking.DetectChangesCompleted");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.ChangeTracking.ForeignKeyChangeDetected");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.ChangeTracking.StateChanged");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.ChangeTracking.ValueGenerated");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Command.CommandCreating");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Command.CommandCreated");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Command.DataReaderDisposing");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Connection.ConnectionOpening");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Connection.ConnectionOpened");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Connection.ConnectionClosing");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Connection.ConnectionClosed");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Transaction.TransactionStarting");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Transaction.TransactionStarted");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Transaction.TransactionCommitting");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Transaction.TransactionCommitted");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Database.Transaction.TransactionDisposed");
     IgnoredEvents.Add("Microsoft.EntityFrameworkCore.Infrastructure.ContextDisposed");
 }
 protected override void ApplyEvent(TestAggregate aggregate, IDomainEvent @event)
 {
     IgnoredEvents.Add(@event.GetType().Name);
 }