public static SkyWalkingBuilder AddEntityFrameworkCore(this SkyWalkingBuilder builder, Action <DatabaseProviderBuilder> optionAction) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } builder.Services.AddSingleton <ITracingDiagnosticProcessor, EntityFrameworkCoreDiagnosticProcessor>(); builder.Services.AddSingleton <IEfCoreSpanFactory, EfCoreSpanFactory>(); if (optionAction != null) { var databaseProviderBuilder = new DatabaseProviderBuilder(builder.Services); optionAction(databaseProviderBuilder); } return(builder); }
public static SkyWalkingExtensions AddEntityFrameworkCore(this SkyWalkingExtensions extensions, Action <DatabaseProviderBuilder> optionAction) { if (extensions == null) { throw new ArgumentNullException(nameof(extensions)); } extensions.Services.AddSingleton <ITracingDiagnosticProcessor, EntityFrameworkCoreTracingDiagnosticProcessor>(); extensions.Services.AddSingleton <IEntityFrameworkCoreSegmentContextFactory, EntityFrameworkCoreSegmentContextFactory>(); if (optionAction != null) { var databaseProviderBuilder = new DatabaseProviderBuilder(extensions.Services); optionAction(databaseProviderBuilder); } return(extensions); }
public static DatabaseProviderBuilder AddNpgsql(this DatabaseProviderBuilder builder) { builder.Services.AddSingleton <IEntityFrameworkCoreSpanMetadataProvider, NpgsqlEntityFrameworkCoreSpanMetadataProvider>(); return(builder); }
public static DatabaseProviderBuilder AddSqlite(this DatabaseProviderBuilder builder) { builder.Services.AddSingleton <IEfCoreSpanMetadataProvider, SqliteEFCoreSpanMetadataProvider>(); return(builder); }
public static DatabaseProviderBuilder AddPomeloMysql(this DatabaseProviderBuilder builder) { builder.Services.AddSingleton <IEfCoreSpanMetadataProvider, MySqlEFCoreSpanMetadataProvider>(); return(builder); }