Set up diagnostic logs for an Azure event hub
You can view two types of logs for Azure Event Hubs:
Activity logs: These logs have information about operations done on a job. The logs are always enabled. You can see activity log entries by selecting Activity log in the left pane for your event hub namespace in the Azure portal. For example: "Create or Update Namespace", "Create or Update Event Hub".
Diagnostic logs: Diagnostic logs provide richer information about operations and actions that are conducted against your namespace by using the API, or through management clients on the language SDK.
The following section shows you how to enable diagnostic logs for an Event Hubs namespace.
Enable diagnostic logs
Diagnostic logs are disabled by default. To enable diagnostic logs, follow these steps:
In the Azure portal, navigate to your Event Hubs namespace.
Select Diagnostics settings under Monitoring in the left pane, and then select + Add diagnostic setting.
In the Category details section, select the types of diagnostic logs that you want to enable. You'll find details about these categories later in this article.
In the Destination details section, set the archive target (destination) that you want; for example, a storage account, an event hub, or a Log Analytics workspace.
Select Save on the toolbar to save the diagnostics settings.
New settings take effect in about 10 minutes. After that, logs appear in the configured archival target, in the Diagnostics logs pane.
For more information about configuring diagnostics, see the overview of Azure diagnostic logs.
Next steps
- Introduction to Event Hubs
- Event Hubs samples
- Get started with Event Hubs