- APM .NET Agent: other versions:
- Introduction
- Set up the Agent
- NuGet packages
- Supported technologies
- Configuration
- Public API
- OpenTelemetry Bridge
- Metrics
- Logs
- Performance tuning
- Troubleshooting
- Upgrading
- Release notes
This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
Entity Framework Core
editEntity Framework Core
editQuick start
editInstrumentation can be enabled for Entity Framework Core by referencing Elastic.Apm.EntityFrameworkCore
package
and passing EfCoreDiagnosticsSubscriber
to the AddElasticApm
method in case of ASP.NET Core as following
app.Services.AddElasticApm(new EfCoreDiagnosticsSubscriber());
or passing EfCoreDiagnosticsSubscriber
to the Subscribe
method
Agent.Subscribe(new EfCoreDiagnosticsSubscriber());
Instrumentation listens for diagnostic events raised by Microsoft.EntityFrameworkCore
2.x+, creating database spans for executed commands.
On this page
Was this helpful?
Thank you for your feedback.