<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pavan Manjunath</title>
    <description>The latest articles on DEV Community by Pavan Manjunath (@pavan296).</description>
    <link>https://dev.to/pavan296</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3339640%2F5daa2d7b-c757-4175-963c-1932484bcbb3.jpeg</url>
      <title>DEV Community: Pavan Manjunath</title>
      <link>https://dev.to/pavan296</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pavan296"/>
    <language>en</language>
    <item>
      <title>📝Mastering Structured Logging in .NET Core with Serilog, App Insights, and Log Analytics</title>
      <dc:creator>Pavan Manjunath</dc:creator>
      <pubDate>Thu, 02 Oct 2025 13:28:17 +0000</pubDate>
      <link>https://dev.to/pavan296/mastering-structured-logging-in-net-core-with-serilog-app-insights-and-log-analytics-1j09</link>
      <guid>https://dev.to/pavan296/mastering-structured-logging-in-net-core-with-serilog-app-insights-and-log-analytics-1j09</guid>
      <description>&lt;h2&gt;
  
  
  Achieving deep observability is non-negotiable for modern applications. This guide details the gold standard pipeline for robust structured logging in .NET Core: integrating Serilog with Azure Application Insights and the underlying Log Analytics Workspace.
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The Core Observability Stack: Roles Defined
Understanding the relationship between these three services is paramount:&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Simply put: Serilog formats the data, App Insights collects the application context, and Log Analytics stores and queries the final dataset.
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Why Structured Logging?
Structured logging is key to turning log lines into valuable data points. Instead of logging raw text, Serilog uses message templates to capture data properties.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example Log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Log.Error("Order {OrderId} failed because of a {Reason} for user {UserId}.", 456, reason, userId);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates searchable properties (OrderId, Reason, UserId) in Azure, enabling powerful filtering and aggregation that simple string searching cannot match.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;Implementation Steps&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 3.1: Install Packages&lt;br&gt;
Add the necessary NuGet packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dotnet add package Serilog.AspNetCore
dotnet add package Serilog.Sinks.ApplicationInsights
dotnet add package Microsoft.ApplicationInsights.AspNetCore
dotnet add package Serilog.Settings.Configuration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3.2: Configure in Program.cs&lt;br&gt;
Configure Serilog early in your application lifecycle. This setup ensures that your structured logs flow directly into Application Insights while preventing duplicate logs from the default provider.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// 1. Create a bootstrap logger (optional, but good for startup errors)
Log.Logger = new LoggerConfiguration()
    .WriteTo.Console()
    .CreateBootstrapLogger();

var builder = WebApplication.CreateBuilder(args);

// 2. Register App Insights SDK (Crucial!)
// The Serilog Sink needs this service configured.
builder.Services.AddApplicationInsightsTelemetry(builder.Configuration["ApplicationInsights:ConnectionString"]);

// 3. Clear default providers to prevent duplicate logs
builder.Logging.ClearProviders(); 

// 4. Configure Serilog to use the Application Insights Sink
builder.Host.UseSerilog((context, services, configuration) =&amp;gt; configuration
    .ReadFrom.Configuration(context.Configuration)
    .ReadFrom.Services(services)
    .Enrich.FromLogContext()
    .WriteTo.Console() 
    .WriteTo.ApplicationInsights(
        services.GetRequiredService&amp;lt;TelemetryConfiguration&amp;gt;(), 
        // This converter ensures logs land in the 'traces' table
        TelemetryConverter.Traces
    ));

// ... rest of builder code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3.3: Configure appsettings.json&lt;br&gt;
Ensure your Application Insights connection string is defined, and set your desired logging levels:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "ApplicationInsights": {
    "ConnectionString": "InstrumentationKey=..." 
  },
  "Serilog": {
    "MinimumLevel": {
      "Default": "Information",
      "Override": {
        "Microsoft": "Warning",
        "System": "Warning"
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Querying and Diagnostics
Once deployed, your structured logs land in the traces table within your Log Analytics Workspace.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Use Kusto Query Language (KQL) to perform diagnostics:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Find all error logs related to a specific user and project the custom property
traces 
| where customDimensions.UserId == "123" 
| where severityLevel == 3 // Severity 3 is Error
| project timestamp, message, customDimensions.OrderId, customDimensions.Reason
| order by timestamp desc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This integrated approach allows you to correlate your custom application events (traces) with system telemetry (requests, exceptions) using the common operation_Id property, giving you a full, end-to-end view of every transaction.&lt;/p&gt;

&lt;p&gt;Mastering this pipeline is key to moving from reactive bug fixing to proactive system health monitoring!&lt;/p&gt;

</description>
      <category>monitoring</category>
      <category>azure</category>
      <category>dotnet</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Azure Functions Deployment Simplified: Mastering Publish Profiles &amp; The Isolated Model</title>
      <dc:creator>Pavan Manjunath</dc:creator>
      <pubDate>Wed, 01 Oct 2025 17:01:58 +0000</pubDate>
      <link>https://dev.to/pavan296/azure-functions-deployment-simplified-mastering-publish-profiles-the-isolated-model-464f</link>
      <guid>https://dev.to/pavan296/azure-functions-deployment-simplified-mastering-publish-profiles-the-isolated-model-464f</guid>
      <description>&lt;p&gt;Azure Function Apps are at the heart of modern serverless architectures, enabling developers to run event-driven code without managing infrastructure. But once your brilliant function is coded, how do you get it from your local machine to the cloud efficiently and reliably? Enter Publish Profiles.&lt;/p&gt;

&lt;p&gt;Far more than just a configuration file, an Azure Function App Publish Profile is a powerful tool that streamlines your deployment process, ensuring consistency and control. Let's dive deep!&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What Exactly is a Publish Profile?&lt;/strong&gt;&lt;br&gt;
At its core, a publish profile (.pubxml file) is an XML document containing a blueprint for how your Function App should be deployed. When you download one from the Azure portal, it's pre-populated with crucial information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Target Azure Resource: The specific Azure Function App instance where your code will live.&lt;/li&gt;
&lt;li&gt;Deployment Method: How the code gets transferred (e.g., Web Deploy, Zip Deploy)&lt;/li&gt;
&lt;li&gt;Build Configuration: Which project configuration (e.g., Release) to use.&lt;/li&gt;
&lt;li&gt;Credentials: Encrypted keys for secure authentication with Azure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And more... Specific settings for file exclusions, pre/post-build actions, etc.&lt;/p&gt;

&lt;p&gt;This single file empowers tools like Visual Studio to automate the complex process of getting your code to Azure with a click.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The .NET Dilemma: In-Process vs. Isolated Process&lt;/strong&gt;&lt;br&gt;
This is where many .NET developers encounter a significant architectural choice, one that fundamentally impacts your Function App's design and deployment. Publish profiles for .NET functions inherently reflect which model you choose:&lt;/p&gt;

&lt;p&gt;-&amp;gt; In-Process Model (Legacy)&lt;br&gt;
Concept: Your function code runs within the same process as the Azure Functions host runtime.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coupling: Tightly coupled to the Functions host, meaning you share its dependencies and runtime version.&lt;/li&gt;
&lt;li&gt;Target Frameworks: Typically .NET Core 3.1 or .NET 6, tied to specific Azure Functions runtime versions.&lt;/li&gt;
&lt;li&gt;Considerations: Simpler for historical projects, but prone to dependency conflicts and less control.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-&amp;gt; Isolated Process Model (.NET Isolated / Worker Process - Recommended!)&lt;br&gt;
Concept: Your function code runs in a separate worker process, completely isolated from the Azure Functions host. Communication happens via gRPC.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decoupling: Gives you full control over your application's dependencies and Program.cs startup.&lt;/li&gt;
&lt;li&gt;Target Frameworks: Can target standard .NET versions like .NET 6, .NET 7, .NET 8, and beyond, independently of the Functions host.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Greater Control: Leverage standard .NET features, middleware, and dependency injection.&lt;/li&gt;
&lt;li&gt;Fewer Conflicts: Significantly reduces dependency issues.&lt;/li&gt;
&lt;li&gt;Future-Proof: Use the latest .NET versions and ecosystem innovations.&lt;/li&gt;
&lt;li&gt;Consistent Experience: Closer to a standard ASP.NET Core application development experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This distinction is crucial for modern .NET Function development. Choosing the Isolated Process model for new projects provides greater flexibility, stability, and a more standard .NET development experience.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foqdwj4l3jrhon5kjb4u0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foqdwj4l3jrhon5kjb4u0.png" alt="IsolatevsTarget" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  AzureFunctions #Serverless #DotNet #CloudComputing #Azure #Deployment #SoftwareDevelopment #TechTips
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Graph Theory in Real Life: How BFS Solves Business Problems You Didn’t Know Existed</title>
      <dc:creator>Pavan Manjunath</dc:creator>
      <pubDate>Wed, 09 Jul 2025 18:20:10 +0000</pubDate>
      <link>https://dev.to/pavan296/graph-theory-in-real-life-how-bfs-solves-business-problems-you-didnt-know-existed-694</link>
      <guid>https://dev.to/pavan296/graph-theory-in-real-life-how-bfs-solves-business-problems-you-didnt-know-existed-694</guid>
      <description>&lt;p&gt;&lt;strong&gt;🧠 Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;-&amp;gt; Ever wondered how your team organizes tasks, routes delivery packages,    or prioritizes bug reports? Beneath the surface, you're living in a graph.&lt;/p&gt;

&lt;p&gt;-&amp;gt; Introduce graphs quickly, mention your focus on 1-based indexing, BFS, and how you initially visualized traversal logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧱 How to brick ideas and find in real life.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I work in logistics domain run many warehouses. Each connected node in your graph represents a department: receiving, packaging, quality check, dispatch… and BFS is the method to check each floor in sequence without getting lost&lt;/p&gt;

&lt;p&gt;Below is the code just refer and link to your ideas.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;how i store graph as .Net developer: C# adjacency list&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7k1l3xtf7lqaietbcfka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7k1l3xtf7lqaietbcfka.png" alt="Adjacency list" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;BFS traversal algorithm:&lt;br&gt;
  Simple explaination: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;create a function with accepts startNode, adjacency list&lt;/li&gt;
&lt;li&gt;take queue put startNode, and make that to true in bool array&lt;/li&gt;
&lt;li&gt;now keep on iterating queue until its empty&lt;/li&gt;
&lt;li&gt;go through each neighbour and check if its visited or not, if its not 
then make it true in bool array, enqueue it.&lt;/li&gt;
&lt;li&gt;pick enqueue item and start step 4.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft1w9mbyolyvo920qvob1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft1w9mbyolyvo920qvob1.png" alt="Main" width="800" height="557"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq790a2otx4y9hhww70im.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq790a2otx4y9hhww70im.png" alt="BFS traversal" width="800" height="578"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💼 Business Use Case Callout&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;📦 BFS in Action: Real-World Usage&lt;br&gt;
Warehouse routing, customer support escalation paths, or even job interview scheduling — all can be modeled as graphs. And understanding how BFS traverses these structures helps you optimize them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💡 Final Reflection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I loved building this small C# BFS tool — not just to crack LeetCode, but to see how it mirrors so many real-world workflows.&lt;br&gt;
How do you mentally map your own work or team’s flow? Do you see graphs in your day-to-day challenges — and are you using them to your advantage? &lt;/p&gt;

&lt;p&gt;Regards,&lt;br&gt;
Pavan&lt;/p&gt;

</description>
      <category>dsa</category>
      <category>graphtheory</category>
      <category>webdev</category>
      <category>csharp</category>
    </item>
  </channel>
</rss>
