---
title: Nodinite Serilog Service Bus Sink
description: Learn how to use the Nodinite Serilog ServiceBus sink to enable reliable end-to-end tracking from Azure Functions and .NET applications using Azure Service Bus queues.
---

<a class="nodinite-release-notes" href="https://portal.nodinite.com/marketplace/15" data-url="https://portal.nodinite.com/marketplace/15"><i class="fal fa-fw fa-file-alt" aria-hidden="true"></i> Release Notes</a>

# <i class="fal fa-display" aria-hidden="true"></i> Nodinite Serilog sink using a Service Bus queue

Use the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Serilog **ServiceBus** with your full framework and .NET Core applications to **enable end-to-end tracking**. Typical examples include [Microsoft Azure functions][] built with .NET (usually CSharp). <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> supports payload Logging and removes the obstacle that Application Insights logging imposes on message size.

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p><strong>Set OriginalMessageType for searchable business data</strong> - The Service Bus sink sends your log events to <a href="https://docs.nodinite.com/logging-and-monitoring/message-queueing/features/azure-service-bus-queues/monitoring-azure-service-bus-queue/">Azure Service Bus</a> queues for reliable asynchronous processing by the <a href="https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/">Pickup Service</a>. Without proper <a href="https://docs.nodinite.com/repository-model/message-types/overview/">Message Types</a>, your logged events won't have business data extraction via <a href="https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/">Search Field Expressions</a>, preventing features like <a href="https://docs.nodinite.com/logging-and-monitoring/non-events/overview/">Non-Events Monitoring</a>, <a href="https://docs.nodinite.com/repository-model/bpms/overview/">Business Process Modeling (BPM)</a>, and business-data searches in <a href="https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/">Log Views</a> from functioning. Always include <code>OriginalMessageType</code> in your logging code before deploying to production. <strong>Service Bus provides reliable messaging with dead-letter queue support.</strong></p></div>
</aside>

<div class="mermaid">
graph LR
    A[.NET Application] --> | Log Event | SLS(Serilog)  
    F[fal:fa-function Azure Function] --> | Log Event | SLS  
    LA[fal:fa-cloud-arrow-down Nodinite Log API]
    PS[far:fa-truck-pickup Pickup Service]
    PS --> LA
    SLS --> SLSB[fa:fa-list Service Bus Sink]
    ASB[fa:fa-list-ol Azure Service Bus Queue]
    SLSB --> ASB
    ASB -..-> | Async | PS  
</div>

## Logging Options

Choose one of the following articles based on the solution you want to enable Logging for:

❔['How To Start Logging With Microsoft.Extensions.Logging.ILogger in Azure Functions'][Serilog - ILogger]  
❔['How To Start Logging With Serilog'][Serilog - Logger]  

## Connection Options

Regardless of your choice, include one of the following configurations in your `appsettings.json` file:

* [Service Bus (Using the default Managed Identity)][Serilog - Config - SB - DMI]  
* [Service Bus (Using an explicit Managed Identity)][Serilog - Config - SB - EMI]  
* [Service Bus (Using a Connection string)][Serilog - Config - SB - CS]  

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>The <strong>Settings</strong> section is shared by all <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Serilog sinks. Read more at <a href="https://docs.nodinite.com/logging-and-monitoring/serilog/settings-section/">Settings Section (appsettings.json)</a></p></div>
</aside>

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>The application opens every connection outbound. For the ports and hostnames to allow, see the <a href="https://docs.nodinite.com/logging-and-monitoring/serilog/overview/#fa-shield-check-what-firewall-settings-are-required-for-the-nodinite-serilog-sinks">firewall settings for the Nodinite Serilog sinks</a>.</p></div>
</aside>

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

❔['How To Start Logging With Microsoft.Extensions.Logging.ILogger in Azure Functions'][Serilog - ILogger]  
❔['How To Start Logging With Serilog'][Serilog - Logger]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

<i class="fal fa-file" aria-hidden="true"></i> [Message Types][] - Critical for [Search Field][Search Fields] extraction from Service Bus sink events  
<i class="fal fa-magnifying-glass-plus" aria-hidden="true"></i> [Search Field Expressions][] - Extract business data from logged messages  
<i class="fal fa-table-list" aria-hidden="true"></i> [Log Views][] - Search logged data by business identifiers  
<i class="fal fa-stopwatch" aria-hidden="true"></i> [Non-Events Monitoring][] - Track message volumes and detect missing messages  
<i class="fal fa-project-diagram" aria-hidden="true"></i> [Business Process Modeling (BPM)][BPM] - End-to-end transaction tracking  
<i class="fal fa-coins" aria-hidden="true"></i> [Reduce Azure Functions Logging Costs][] - Lower the Azure cost of logging Azure Functions  
<i class="fal fa-coins" aria-hidden="true"></i> [Azure Costs for Blob Storage and Event Hub][] - What staging log events in Azure costs  
<i class="fal fa-clock" aria-hidden="true"></i> [Reduce Azure Logic Apps Run History Retention to Lower TCO][] - The same approach for Logic Apps  
<i class="fal fa-cloud-arrow-down" aria-hidden="true"></i> [Reduce Azure API Management Logging Costs][] - The same approach for API Management  
<i class="fal fa-truck-pickup" aria-hidden="true"></i> [Pickup Service][] - Processes Service Bus messages reliably  

* [Serilog - Blob Storage][]  
* [Serilog - Event Hub][]  
* [Serilog - File][]  
* [Serilog - LogAPI][]  

[Azure Costs for Blob Storage and Event Hub]:https://docs.nodinite.com/logging-and-monitoring/custom-logging/troubleshooting/azure-costs-for-blob-storage-and-event-hub/
[Azure Service Bus]:https://docs.nodinite.com/logging-and-monitoring/message-queueing/features/azure-service-bus-queues/monitoring-azure-service-bus-queue/
[BPM]:https://docs.nodinite.com/repository-model/bpms/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[Microsoft Azure functions]:https://azure.microsoft.com/en-us/products/functions/
[Non-Events Monitoring]:https://docs.nodinite.com/logging-and-monitoring/non-events/overview/
[Pickup Service]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/
[Reduce Azure API Management Logging Costs]:https://docs.nodinite.com/logging-and-monitoring/azure-api-management/troubleshooting/reduce-azure-api-management-logging-costs/
[Reduce Azure Functions Logging Costs]:https://docs.nodinite.com/logging-and-monitoring/serilog/troubleshooting/reduce-azure-functions-logging-costs/
[Reduce Azure Logic Apps Run History Retention to Lower TCO]:https://docs.nodinite.com/logging-and-monitoring/azure-logic-apps/troubleshooting/reduce-azure-logic-apps-run-history-retention-to-lower-tco/
[Search Field Expressions]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/
[Search Fields]:https://docs.nodinite.com/administration/log-management/search-fields/features/what-is-a-search-field/
[Serilog - Blob Storage]:https://docs.nodinite.com/logging-and-monitoring/serilog/features/blob-storage/
[Serilog - Config - SB - CS]:https://docs.nodinite.com/logging-and-monitoring/serilog/how-to-start-logging-with-serilog/#service-bus-using-a-connection-string
[Serilog - Config - SB - DMI]:https://docs.nodinite.com/logging-and-monitoring/serilog/how-to-start-logging-with-serilog/#service-bus-using-the-default-managed-identity
[Serilog - Config - SB - EMI]:https://docs.nodinite.com/logging-and-monitoring/serilog/how-to-start-logging-with-serilog/#service-bus-using-an-explicit-managed-identity
[Serilog - Event Hub]:https://docs.nodinite.com/logging-and-monitoring/serilog/features/event-hub/
[Serilog - File]:https://docs.nodinite.com/logging-and-monitoring/serilog/features/file/
[Serilog - ILogger]:https://docs.nodinite.com/logging-and-monitoring/serilog/how-to-start-logging-extending-ilogger/
[Serilog - LogAPI]:https://docs.nodinite.com/logging-and-monitoring/serilog/features/log-api/
[Serilog - Logger]:https://docs.nodinite.com/logging-and-monitoring/serilog/how-to-start-logging-with-serilog/
[Serilog - Settings Section]:https://docs.nodinite.com/logging-and-monitoring/serilog/settings-section/
[Serilog firewall]:https://docs.nodinite.com/logging-and-monitoring/serilog/overview/#fa-shield-check-what-firewall-settings-are-required-for-the-nodinite-serilog-sinks