SQL Server › SQL Server Profiler & Extended Events

What are Extended Events, and why are they generally recommended over SQL Server Profiler for modern monitoring needs?

Beginner

Answer

Extended Events are a lightweight, highly configurable event tracing system built directly into the SQL Server engine, using significantly less overhead than the older Profiler tool, making them a much safer choice for monitoring busy production servers without noticeably impacting performance while capturing the events you need.
CREATE EVENT SESSION SlowQueries ON SERVER
ADD EVENT sqlserver.sql_statement_completed
(WHERE duration > 1000000)
ADD TARGET package0.event_file (SET filename = 'SlowQueries.xel');
Real-world example A database administrator sets up an Extended Events session to capture only queries running longer than one second, gaining the monitoring insight they need with far less overhead than running a comparable trace in the older Profiler tool.

Common follow-ups: How much less overhead do Extended Events typically add compared to Profiler?;What are targets in the context of Extended Events, and what options are available?