<?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: Modulis</title>
    <description>The latest articles on DEV Community by Modulis (@modulis).</description>
    <link>https://dev.to/modulis</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4225709%2F24670ac1-26b5-47e2-aa22-3c3999656a62.png</url>
      <title>DEV Community: Modulis</title>
      <link>https://dev.to/modulis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/modulis"/>
    <language>en</language>
    <item>
      <title>The Four-Tool Tax: What Your Monitoring Stack Really Costs</title>
      <dc:creator>Modulis</dc:creator>
      <pubDate>Wed, 25 Nov 2026 13:46:07 +0000</pubDate>
      <link>https://dev.to/modulis/the-four-tool-tax-what-your-monitoring-stack-really-costs-4h5e</link>
      <guid>https://dev.to/modulis/the-four-tool-tax-what-your-monitoring-stack-really-costs-4h5e</guid>
      <description>&lt;p&gt;Most SaaS engineering teams don't use just one tool to understand what's happening in production.&lt;/p&gt;

&lt;p&gt;They have one platform for logs and metrics, another for errors, a third for session replay, and a fourth for product analytics.&lt;/p&gt;

&lt;p&gt;Each tool solves a real problem. But together, they create a cost that often goes beyond the invoices.&lt;/p&gt;

&lt;p&gt;We call this the &lt;strong&gt;four-tool tax&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here's how to calculate it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four tools in a typical production stack
&lt;/h2&gt;

&lt;p&gt;A SaaS team with 20–50 engineers might use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Metrics, logs and APM:&lt;/strong&gt; Infrastructure and backend performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error tracking:&lt;/strong&gt; Exceptions and stack traces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session replay:&lt;/strong&gt; Understanding what users did before an issue occurred.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Product analytics:&lt;/strong&gt; Understanding user behavior and product usage.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In conversations with teams of 10–60 engineers, combined annual spending across these categories can typically range from &lt;strong&gt;$80,000 to $200,000&lt;/strong&gt;, depending on traffic, retention and seats.&lt;/p&gt;

&lt;p&gt;The problem isn't necessarily that any individual tool is too expensive. It's that each has a different pricing model and growth curve.&lt;/p&gt;

&lt;h2&gt;
  
  
  The costs that don't appear on invoices
&lt;/h2&gt;

&lt;p&gt;The subscription fees are only the visible part.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Engineers spend time switching between tools
&lt;/h3&gt;

&lt;p&gt;When an incident happens, the error might be in one platform, the trace in another, and the user's session in a third.&lt;/p&gt;

&lt;p&gt;Engineers manually copy timestamps and user IDs, then try to reconstruct what happened.&lt;/p&gt;

&lt;p&gt;Context gathering can account for a significant portion of incident resolution time.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Four SDKs running in your application
&lt;/h3&gt;

&lt;p&gt;Each platform brings its own SDK, initialization logic, network requests and upgrade cycle.&lt;/p&gt;

&lt;p&gt;Three of the four tools commonly run in the browser.&lt;/p&gt;

&lt;p&gt;That means additional JavaScript to download and parse, more work during page load, and more dependencies to maintain.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Customer data gets duplicated
&lt;/h3&gt;

&lt;p&gt;Logs, errors, session recordings and analytics events can contain personal information.&lt;/p&gt;

&lt;p&gt;With four vendors, that data may be distributed across four different environments.&lt;/p&gt;

&lt;p&gt;This creates additional work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reviewing four subprocessors.&lt;/li&gt;
&lt;li&gt;Configuring data scrubbing and retention in four places.&lt;/li&gt;
&lt;li&gt;Handling deletion requests across multiple systems.&lt;/li&gt;
&lt;li&gt;Answering security questionnaires about multiple vendors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Different tools produce different answers
&lt;/h3&gt;

&lt;p&gt;Ask four platforms how many users experienced an error yesterday.&lt;/p&gt;

&lt;p&gt;You may get four different numbers because of differences in sampling, user identification and session definitions.&lt;/p&gt;

&lt;p&gt;Engineering and product teams then spend time reconciling data instead of using it.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. More accounts, permissions and renewals
&lt;/h3&gt;

&lt;p&gt;Every new engineer may need access to four systems.&lt;/p&gt;

&lt;p&gt;Every offboarding process requires removing access in multiple places. Every renewal brings another usage review and negotiation.&lt;/p&gt;

&lt;p&gt;These administrative tasks consume valuable engineering and leadership time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Calculate your four-tool tax
&lt;/h2&gt;

&lt;p&gt;You don't need exact numbers to get started. Reasonable estimates are enough.&lt;/p&gt;

&lt;p&gt;Use this worksheet:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost category&lt;/th&gt;
&lt;th&gt;How to calculate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A. Tool invoices&lt;/td&gt;
&lt;td&gt;Annual cost of all four tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B. Incident context time&lt;/td&gt;
&lt;td&gt;Incidents/month × context hours × engineers involved × hourly cost × 12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C. Tool maintenance&lt;/td&gt;
&lt;td&gt;Monthly SDK, configuration and alert-tuning hours × hourly cost × 12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D. Administration&lt;/td&gt;
&lt;td&gt;Annual hours spent on renewals, seats and access reviews × hourly cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E. Compliance overhead&lt;/td&gt;
&lt;td&gt;Annual hours spent on security reviews and data requests × hourly cost&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Total four-tool tax = A + B + C + D + E&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  A practical example
&lt;/h3&gt;

&lt;p&gt;Consider a 30-engineer team:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Annual spend across four tools: $110,000&lt;/li&gt;
&lt;li&gt;Incidents per month: 10&lt;/li&gt;
&lt;li&gt;Context-gathering time per incident: 1.5 hours&lt;/li&gt;
&lt;li&gt;Engineers involved: 2&lt;/li&gt;
&lt;li&gt;Loaded hourly engineering cost: $90&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Annual incident context cost:&lt;/p&gt;

&lt;p&gt;10 × 1.5 × 2 × $90 × 12 = &lt;strong&gt;$32,400&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That means the team is already spending $142,400 when combining subscriptions and incident context-gathering alone.&lt;/p&gt;

&lt;p&gt;SDK maintenance, renewals and security reviews push the total higher — before accounting for customer impact from slower resolution.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does consolidation actually change?
&lt;/h2&gt;

&lt;p&gt;Consolidation shouldn't simply mean putting links to four dashboards on one page.&lt;/p&gt;

&lt;p&gt;The real goal is to bring signals together at collection time.&lt;/p&gt;

&lt;p&gt;Logs, traces, metrics, errors, sessions and analytics events should share consistent IDs and timestamps.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Four separate tools&lt;/th&gt;
&lt;th&gt;Consolidated platform&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Context spread across four tools&lt;/td&gt;
&lt;td&gt;Error, trace, logs, session and commit together&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Four SDKs&lt;/td&gt;
&lt;td&gt;One SDK built on OpenTelemetry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Four copies of customer data&lt;/td&gt;
&lt;td&gt;One place to manage scrubbing and retention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Different user and session definitions&lt;/td&gt;
&lt;td&gt;Shared identifiers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Four billing models&lt;/td&gt;
&lt;td&gt;One pricing model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Four renewals&lt;/td&gt;
&lt;td&gt;One renewal&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What to check before consolidating
&lt;/h2&gt;

&lt;p&gt;Before replacing tools, make sure the new platform:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Covers the needs of engineering, product and support teams.&lt;/li&gt;
&lt;li&gt;Uses open standards such as OpenTelemetry.&lt;/li&gt;
&lt;li&gt;Supports your data residency requirements.&lt;/li&gt;
&lt;li&gt;Has pricing that doesn't grow with every user or log line.&lt;/li&gt;
&lt;li&gt;Can be tested on one application before a wider migration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consolidation should reduce complexity without sacrificing capability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Modulis fits
&lt;/h2&gt;

&lt;p&gt;Modulis brings logs, traces, metrics, error monitoring, session replay, and product and web analytics into one deployment running inside your own cloud on AWS, GCP or Azure.&lt;/p&gt;

&lt;p&gt;The signals share context, allowing teams to investigate an error alongside its trace, surrounding logs, user session and related GitHub commit.&lt;/p&gt;

&lt;p&gt;Modulis also supports AI-assisted root cause analysis using your own LLM key.&lt;/p&gt;

&lt;p&gt;Pricing is per application rather than per host, GB, session or tracked user:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free: $0/month, one application&lt;/li&gt;
&lt;li&gt;Starter: $199/month&lt;/li&gt;
&lt;li&gt;Growth: $999/month&lt;/li&gt;
&lt;li&gt;Enterprise: Custom&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cloud infrastructure is billed separately on your own cloud account.&lt;/p&gt;

&lt;h2&gt;
  
  
  One exercise worth doing this month
&lt;/h2&gt;

&lt;p&gt;Before your next renewal, sit down with your engineering and finance teams and calculate the full cost of your current stack.&lt;/p&gt;

&lt;p&gt;Don't stop at the invoices.&lt;/p&gt;

&lt;p&gt;Include the hours spent switching between tools, maintaining SDKs, managing access and completing security reviews.&lt;/p&gt;

&lt;p&gt;You may find that the biggest cost isn't the software. It's the engineering time spent connecting information that should already be connected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the original article:&lt;/strong&gt; &lt;a href="https://modulis.ai/blog/four-tool-tax-monitoring-stack/" rel="noopener noreferrer"&gt;https://modulis.ai/blog/four-tool-tax-monitoring-stack/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I work with Modulis. This article discusses the problem of tool sprawl and how consolidation can address it.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>sre</category>
      <category>observability</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>What Does a Production Incident Actually Cost? A Practical Way to Calculate It</title>
      <dc:creator>Modulis</dc:creator>
      <pubDate>Fri, 13 Nov 2026 06:48:56 +0000</pubDate>
      <link>https://dev.to/modulis/what-does-a-production-incident-actually-cost-a-practical-way-to-calculate-it-35e5</link>
      <guid>https://dev.to/modulis/what-does-a-production-incident-actually-cost-a-practical-way-to-calculate-it-35e5</guid>
      <description>&lt;p&gt;A production incident is rarely just a few minutes of downtime.&lt;/p&gt;

&lt;p&gt;An API starts failing. An alert fires. Engineers join a Slack channel, open dashboards, inspect logs, follow traces, check recent deployments and start trying to understand what changed.&lt;/p&gt;

&lt;p&gt;Eventually, the issue gets resolved.&lt;/p&gt;

&lt;p&gt;But how much did that incident actually cost?&lt;/p&gt;

&lt;p&gt;Most engineering teams track uptime, error rates and Mean Time to Resolution (MTTR). Far fewer calculate the engineering time consumed by incidents and translate it into a financial number.&lt;/p&gt;

&lt;p&gt;That number can make a big difference when prioritizing reliability improvements.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Start with the engineering cost
&lt;/h2&gt;

&lt;p&gt;The easiest place to start is the time engineers spend investigating and resolving incidents.&lt;/p&gt;

&lt;p&gt;You need four inputs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Number of incidents per month&lt;/li&gt;
&lt;li&gt;Average resolution time per incident&lt;/li&gt;
&lt;li&gt;Average number of engineers involved&lt;/li&gt;
&lt;li&gt;Loaded hourly cost per engineer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The formula is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monthly engineering incident cost =&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Incidents per month × Hours per incident × Engineers involved × Cost per engineer-hour&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let's use an example.&lt;/p&gt;

&lt;p&gt;Assume an engineering team experiences:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Incidents per month&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Average resolution time&lt;/td&gt;
&lt;td&gt;3 hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Engineers involved&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Loaded engineer-hour cost&lt;/td&gt;
&lt;td&gt;$75&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The calculation:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;8 × 3 × 3 × $75 = $5,400/month&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's $64,800 annually in engineering time.&lt;/p&gt;

&lt;p&gt;This is not necessarily what the company loses in revenue. It is the estimated cost of engineering capacity spent handling production incidents.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Engineering time is only one part of the cost
&lt;/h2&gt;

&lt;p&gt;A complete incident-cost analysis should distinguish between several categories.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Engineering time&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The direct cost of engineers investigating, mitigating, fixing and validating an incident.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Customer impact&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Customers may experience failed requests, interrupted workflows, degraded performance or loss of access to important features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Revenue impact&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For transaction-heavy products, failed payments, abandoned checkouts and interrupted business workflows can have measurable financial consequences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Support and recovery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Support teams may spend additional time responding to tickets, communicating with customers and processing service credits or refunds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Opportunity cost&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Time spent repeatedly investigating incidents is time engineers cannot spend building features, improving architecture or addressing technical debt.&lt;/p&gt;

&lt;p&gt;These costs should be calculated separately wherever possible. Otherwise, it's easy to count the same impact twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Why investigation time matters
&lt;/h2&gt;

&lt;p&gt;MTTR is often discussed as one number, but the incident lifecycle has several stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Detection – How long does it take to recognize the problem?&lt;/li&gt;
&lt;li&gt;Investigation – How long does it take to understand the cause?&lt;/li&gt;
&lt;li&gt;Remediation – How long does it take to implement and validate the fix?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A significant part of engineering effort can disappear into investigation.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because information is fragmented.&lt;/p&gt;

&lt;p&gt;An engineer might have to move between an error tracker, a log explorer, a distributed tracing system, a session replay tool and Git history.&lt;/p&gt;

&lt;p&gt;They then manually correlate timestamps, trace IDs, affected requests and recent deployments.&lt;/p&gt;

&lt;p&gt;The problem isn't always a lack of telemetry. It's the time required to connect the available evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. How to reduce the cost
&lt;/h2&gt;

&lt;p&gt;Reducing incident cost doesn't necessarily mean preventing every failure. It also means making failures faster to understand and resolve.&lt;/p&gt;

&lt;p&gt;Some practical improvements:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correlate observability signals.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Make it possible to move from an error to its relevant logs, traces and request context without manually searching across systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect incidents to deployments and code changes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Understanding what changed recently can help narrow down the investigation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Improve incident context.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Group recurring errors, identify affected services and make relevant evidence available from the beginning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reduce repetitive investigation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use automation and AI-assisted analysis to gather evidence and suggest likely root causes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep remediation reviewable.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suggested fixes should be inspectable by engineers before they are merged or deployed.&lt;/p&gt;

&lt;p&gt;The objective is to reduce time spent reconstructing what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Calculate your own incident cost
&lt;/h2&gt;

&lt;p&gt;Start with your actual incident frequency, average resolution time, team size and loaded engineering cost.&lt;/p&gt;

&lt;p&gt;Don't assume every incident has the same financial impact. Start with the measurable engineering component and add customer or revenue impact separately when reliable data is available.&lt;/p&gt;

&lt;p&gt;Modulis has an &lt;a href="https://modulis.ai/" rel="noopener noreferrer"&gt;incident cost calculator&lt;/a&gt; that uses these four inputs.&lt;/p&gt;

&lt;p&gt;For example, its default scenario of 8 incidents per month, 3 hours per incident, 3 engineers and $75 per engineer-hour gives an estimated $5,400 monthly engineering cost.&lt;/p&gt;

&lt;p&gt;The estimate does not include lost revenue or customer churn.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thought
&lt;/h2&gt;

&lt;p&gt;Production reliability is often presented as a technical investment.&lt;/p&gt;

&lt;p&gt;But incidents also consume an economic resource: engineering capacity.&lt;/p&gt;

&lt;p&gt;When a team repeatedly spends hours finding the same kinds of problems, the cost accumulates quietly.&lt;/p&gt;

&lt;p&gt;Measuring that cost gives engineering leaders a better way to prioritize observability, debugging improvements and incident-response automation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The goal isn't just fewer production incidents. It's less engineering time lost when they happen.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I work with Modulis, an AI-powered engineering intelligence platform that connects production errors with logs, traces, session context and Git changes to support faster incident investigation.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Original article: &lt;a href="https://modulis.ai/blog/cost-of-a-production-incident/" rel="noopener noreferrer"&gt;https://modulis.ai/blog/cost-of-a-production-incident/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>sre</category>
      <category>softwareengineering</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What Happens to Your Data When an AI SRE Agent Investigates an Incident?</title>
      <dc:creator>Modulis</dc:creator>
      <pubDate>Thu, 12 Nov 2026 18:34:35 +0000</pubDate>
      <link>https://dev.to/modulis/what-happens-to-your-data-when-an-ai-sre-agent-investigates-an-incident-3562</link>
      <guid>https://dev.to/modulis/what-happens-to-your-data-when-an-ai-sre-agent-investigates-an-incident-3562</guid>
      <description>&lt;p&gt;AI SRE agents promise to reduce the time engineers spend investigating production incidents.&lt;/p&gt;

&lt;p&gt;An alert fires. The agent retrieves logs, traces, metrics and deployment history, analyzes the available evidence, and suggests a likely root cause.&lt;/p&gt;

&lt;p&gt;It sounds straightforward.&lt;/p&gt;

&lt;p&gt;But there's an important question engineering and security teams should ask before giving an AI agent access to production systems:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where does your production data actually go during that investigation?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This matters because production telemetry is not just technical information. It can contain customer identifiers, internal service details, API paths, error payloads, infrastructure metadata and occasionally sensitive information that was never intended to reach an external system.&lt;/p&gt;

&lt;p&gt;Let's look at the data flow and the architectural decisions that matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What data does an AI SRE agent need?
&lt;/h2&gt;

&lt;p&gt;An AI SRE agent needs context to investigate incidents effectively.&lt;/p&gt;

&lt;p&gt;Depending on the system and integrations, that context can include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Logs:&lt;/strong&gt; Application events, exceptions, stack traces and error messages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metrics:&lt;/strong&gt; CPU, memory, latency, throughput and resource utilization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distributed traces:&lt;/strong&gt; Request paths and dependencies across services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error data:&lt;/strong&gt; Exception groups, affected endpoints and failure patterns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session context:&lt;/strong&gt; User interactions leading up to a frontend error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git and deployment metadata:&lt;/strong&gt; Recent commits, code changes and deployments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more useful context an agent has, the better it can investigate.&lt;/p&gt;

&lt;p&gt;For example, a latency spike might initially look like a database problem. But when the agent correlates traces, application logs and a recent deployment, it may discover that a new downstream API call is responsible.&lt;/p&gt;

&lt;p&gt;The important point is that the agent may need access to considerably more than the original alert.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Follow the data through an AI investigation
&lt;/h2&gt;

&lt;p&gt;A typical investigation has several stages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 1: Data collection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Telemetry is collected from applications and infrastructure through instrumentation and integrations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 2: Context retrieval&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent queries relevant data sources. It may retrieve logs, traces, deployment events, repository information and infrastructure metadata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 3: AI inference&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Relevant context is assembled into prompts or model requests. The AI model reasons over the evidence and generates an investigation result.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 4: Results and remediation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent returns a root-cause hypothesis, supporting evidence and potentially a suggested fix or pull request.&lt;/p&gt;

&lt;p&gt;Each stage introduces a different data-handling question.&lt;/p&gt;

&lt;p&gt;Where is telemetry stored? Where is the context assembled? Which model processes it? Where are prompts and responses retained?&lt;/p&gt;

&lt;p&gt;Looking only at the location of the observability database does not answer all these questions.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Three deployment models to understand
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Vendor-hosted SaaS
&lt;/h3&gt;

&lt;p&gt;In a traditional SaaS architecture, telemetry is sent to infrastructure operated by the vendor.&lt;/p&gt;

&lt;p&gt;The vendor may also process selected context through an AI model provider.&lt;/p&gt;

&lt;p&gt;This can be convenient because the infrastructure and integrations are managed for you. However, engineering and security teams should understand which data leaves their environment, where it is processed and which subprocessors are involved.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bring Your Own Cloud (BYOC)
&lt;/h3&gt;

&lt;p&gt;With BYOC, the platform runs inside infrastructure controlled by the customer.&lt;/p&gt;

&lt;p&gt;The customer retains control over the cloud account and the environment where application telemetry is stored and processed.&lt;/p&gt;

&lt;p&gt;This changes the data boundary compared with a conventional shared SaaS deployment.&lt;/p&gt;

&lt;p&gt;However, BYOC alone does not answer every AI-related security question. You still need to understand where model inference occurs and whether prompts or retrieved context are sent elsewhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bring Your Own Key (BYOK)
&lt;/h3&gt;

&lt;p&gt;BYOK allows a customer to connect their own AI model API key or deployment.&lt;/p&gt;

&lt;p&gt;For example, a company may use its own Azure OpenAI or Amazon Bedrock deployment rather than a model account managed by the software vendor.&lt;/p&gt;

&lt;p&gt;This gives the customer greater control over model selection, account ownership and associated AI usage.&lt;/p&gt;

&lt;p&gt;One distinction is worth remembering:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BYOC controls where the platform runs. BYOK controls whose model credentials and inference deployment are used.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;They address related but different parts of the data architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Questions to ask before adopting an AI SRE agent
&lt;/h2&gt;

&lt;p&gt;Before connecting an agent to production, ask the vendor:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Where is telemetry stored and processed?&lt;/li&gt;
&lt;li&gt;Does raw application data leave our cloud environment?&lt;/li&gt;
&lt;li&gt;Which AI model receives investigation context?&lt;/li&gt;
&lt;li&gt;Are prompts and responses retained by the model provider?&lt;/li&gt;
&lt;li&gt;Is customer data used for model training?&lt;/li&gt;
&lt;li&gt;Can we use our own model key and deployment?&lt;/li&gt;
&lt;li&gt;What permissions does the agent require?&lt;/li&gt;
&lt;li&gt;Can we audit the data it retrieves and actions it performs?&lt;/li&gt;
&lt;li&gt;Does it require write access to production, or can it begin in read-only mode?&lt;/li&gt;
&lt;li&gt;Can we verify the architecture through our own cloud and network logs?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Don't settle for an answer that simply says the platform is secure or enterprise-ready.&lt;/p&gt;

&lt;p&gt;Ask for the actual data flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Security is also about what the agent can do
&lt;/h2&gt;

&lt;p&gt;Data access is only half the problem.&lt;/p&gt;

&lt;p&gt;Consider two AI agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agent A can read telemetry, investigate errors and suggest a fix.&lt;/li&gt;
&lt;li&gt;Agent B can read telemetry, modify infrastructure, execute commands and deploy changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are very different permission models.&lt;/p&gt;

&lt;p&gt;A sensible adoption approach is to begin with read-only investigation and gradually introduce approval-based remediation.&lt;/p&gt;

&lt;p&gt;For example, an agent could generate a pull request containing a suggested code fix. An engineer reviews the evidence and changes before merging it.&lt;/p&gt;

&lt;p&gt;That is very different from allowing an AI system to modify production automatically.&lt;/p&gt;

&lt;p&gt;The objective should be to reduce investigation effort without removing engineering control.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. How Modulis approaches data ownership
&lt;/h2&gt;

&lt;p&gt;Disclosure: I work with Modulis.&lt;/p&gt;

&lt;p&gt;Modulis follows a Bring Your Own Cloud architecture. Its software is deployed inside the customer's own cloud environment, and application telemetry such as logs, traces, metrics, errors and session data is processed and stored there.&lt;/p&gt;

&lt;p&gt;For AI-assisted resolution, Modulis supports Bring Your Own Key. Customers connect their own model key, such as an Azure OpenAI or Bedrock deployment, so inference runs within their cloud boundary rather than through a third-party model controlled by Modulis.&lt;/p&gt;

&lt;p&gt;The intention is to give engineering teams a managed production intelligence platform while retaining control over their telemetry and AI model usage.&lt;/p&gt;

&lt;p&gt;You can read more about the architecture and data-handling approach here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://modulis.ai/blog/ai-sre-agent-where-your-data-goes/" rel="noopener noreferrer"&gt;https://modulis.ai/blog/ai-sre-agent-where-your-data-goes/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;AI SRE agents can make incident investigation significantly more efficient, but adopting one should involve more than evaluating the quality of its root-cause analysis.&lt;/p&gt;

&lt;p&gt;Understand the complete data lifecycle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What data is collected?&lt;/li&gt;
&lt;li&gt;Where is it stored?&lt;/li&gt;
&lt;li&gt;Where does inference happen?&lt;/li&gt;
&lt;li&gt;Who can access it?&lt;/li&gt;
&lt;li&gt;What can the agent change?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An AI agent should make production operations easier without creating uncertainty about where production data goes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The right question isn't just how intelligent the agent is. It's whether you understand and control the environment in which it operates.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>sre</category>
      <category>security</category>
    </item>
    <item>
      <title>Your Observability Bill Is Growing Faster Than Traffic. Here's How to Audit It.</title>
      <dc:creator>Modulis</dc:creator>
      <pubDate>Mon, 09 Nov 2026 09:49:09 +0000</pubDate>
      <link>https://dev.to/modulis/your-observability-bill-is-growing-faster-than-traffic-heres-how-to-audit-it-2lod</link>
      <guid>https://dev.to/modulis/your-observability-bill-is-growing-faster-than-traffic-heres-how-to-audit-it-2lod</guid>
      <description>&lt;p&gt;Your application traffic is growing steadily. Your infrastructure is scaling as expected. Nothing particularly unusual is happening in production.&lt;/p&gt;

&lt;p&gt;But your observability bill keeps increasing.&lt;/p&gt;

&lt;p&gt;This is a problem many engineering teams encounter as their systems grow. More services produce more telemetry. Debugging changes increase log volume. Additional infrastructure introduces more hosts and spans. At the same time, teams often add separate tools for monitoring, error tracking, session replay and product analytics.&lt;/p&gt;

&lt;p&gt;Eventually, the cost of understanding your own system becomes a significant operational expense.&lt;/p&gt;

&lt;p&gt;The interesting part is that this increase doesn't always reflect an equivalent increase in customer traffic or business activity.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Observability pricing has multiple dimensions
&lt;/h2&gt;

&lt;p&gt;Observability vendors use different pricing models. Common billing dimensions include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Log ingestion:&lt;/strong&gt; How many gigabytes of logs are collected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traces and spans:&lt;/strong&gt; How much tracing data is ingested or retained.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure hosts:&lt;/strong&gt; How many hosts or monitored resources are covered.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seats:&lt;/strong&gt; How many engineers or users access the platform.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These models can make costs difficult to forecast.&lt;/p&gt;

&lt;p&gt;Consider a team that adds several backend services. Each service introduces more logs and traces. The team also increases log verbosity while investigating a production issue.&lt;/p&gt;

&lt;p&gt;The application may be serving roughly the same number of requests, but the volume of telemetry being collected has changed.&lt;/p&gt;

&lt;p&gt;The monitoring bill reflects that change.&lt;/p&gt;

&lt;p&gt;This is one reason engineering teams should treat observability spend as an architectural consideration rather than simply another SaaS subscription.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Tool sprawl makes the problem harder
&lt;/h2&gt;

&lt;p&gt;The problem is not always one expensive monitoring platform.&lt;/p&gt;

&lt;p&gt;A typical engineering stack may include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Infrastructure monitoring and APM&lt;/li&gt;
&lt;li&gt;Error tracking&lt;/li&gt;
&lt;li&gt;Session replay&lt;/li&gt;
&lt;li&gt;Product analytics&lt;/li&gt;
&lt;li&gt;Log management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each tool may have its own billing model, retention policy and contract.&lt;/p&gt;

&lt;p&gt;This creates two types of cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Direct cost:&lt;/strong&gt; Separate subscriptions and usage-based charges across multiple vendors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Operational cost:&lt;/strong&gt; Engineers switching between tools, matching timestamps, correlating trace IDs and trying to understand an incident using disconnected information.&lt;/p&gt;

&lt;p&gt;The second cost is easy to overlook.&lt;/p&gt;

&lt;p&gt;Even when every individual tool seems reasonably priced, maintaining the complete stack can become expensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Cutting telemetry is not always the answer
&lt;/h2&gt;

&lt;p&gt;When an observability bill becomes difficult to justify, teams often consider reducing log retention, disabling instrumentation or collecting fewer traces.&lt;/p&gt;

&lt;p&gt;Sometimes that is necessary. But blindly reducing telemetry can create another problem.&lt;/p&gt;

&lt;p&gt;The information removed to reduce costs may be exactly what engineers need during the next production incident.&lt;/p&gt;

&lt;p&gt;The objective should not be to collect as little data as possible.&lt;/p&gt;

&lt;p&gt;It should be to understand what data is being collected, why it is being collected, what it costs and how useful it is during investigation.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Start with a cost audit
&lt;/h2&gt;

&lt;p&gt;Before switching vendors or redesigning your observability stack, understand where the current spend comes from.&lt;/p&gt;

&lt;p&gt;Here is a practical starting point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: List every observability product.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Include infrastructure monitoring, APM, logs, traces, error tracking, session replay and analytics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Identify the billing unit.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For each tool, understand whether the primary cost is based on ingestion volume, hosts, spans, seats, retention or a combination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Compare cost against workload growth.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Look at monthly telemetry volume alongside application growth, new services, deployment frequency and instrumentation changes.&lt;/p&gt;

&lt;p&gt;This helps distinguish genuine workload growth from changes in how much data the system emits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Review the value of collected data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ask whether teams actively use the signals being stored. Review retention requirements and whether the same operational questions are being answered across multiple products.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Calculate the total cost of ownership.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Include subscriptions, infrastructure, storage and the engineering time spent maintaining and reconciling the tools.&lt;/p&gt;

&lt;p&gt;The invoice is only part of the cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Think about pricing predictability
&lt;/h2&gt;

&lt;p&gt;There isn't one pricing model that is automatically best for every engineering team.&lt;/p&gt;

&lt;p&gt;Usage-based pricing can make sense for smaller workloads where telemetry volume is low and predictable.&lt;/p&gt;

&lt;p&gt;As workloads grow, however, a per-GB, per-host or per-span model can make forecasting more difficult.&lt;/p&gt;

&lt;p&gt;A flat subscription model offers a different trade-off: the subscription is determined by a plan tier rather than increasing with every unit of telemetry.&lt;/p&gt;

&lt;p&gt;For example, Modulis uses a flat monthly subscription per plan tier, with unlimited ingestion on paid tiers subject to fair use. It combines observability, error monitoring, session replay, product analytics and AI-assisted resolution in one platform.&lt;/p&gt;

&lt;p&gt;There are still costs to account for.&lt;/p&gt;

&lt;p&gt;With its Bring Your Own Cloud (BYOC) model, the customer pays their cloud provider separately for the infrastructure used by the platform. With Bring Your Own Key (BYOK), AI inference is separately billed by the model provider.&lt;/p&gt;

&lt;p&gt;That means a meaningful comparison should include the subscription, cloud infrastructure and AI inference rather than comparing subscription prices alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Make observability cost part of engineering ownership
&lt;/h2&gt;

&lt;p&gt;Observability is essential. Production systems need logs, metrics, traces and error visibility.&lt;/p&gt;

&lt;p&gt;But collecting more data should not automatically mean accepting an unpredictable bill.&lt;/p&gt;

&lt;p&gt;Engineering and platform teams should understand the cost implications of their instrumentation decisions just as they understand their compute and storage decisions.&lt;/p&gt;

&lt;p&gt;A useful observability strategy should balance three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Visibility into production systems.&lt;/li&gt;
&lt;li&gt;The ability to investigate incidents without unnecessary friction.&lt;/li&gt;
&lt;li&gt;A cost model that can be forecast as the system grows.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The goal is not to become blind to production problems to save money.&lt;/p&gt;

&lt;p&gt;It is to build a system where visibility remains useful, connected and financially sustainable.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: This article is published by Modulis, an engineering observability and production-resolution platform.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Originally published at: &lt;a href="https://modulis.ai/blog/monitoring-bill-grows-faster-than-traffic/" rel="noopener noreferrer"&gt;https://modulis.ai/blog/monitoring-bill-grows-faster-than-traffic/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>observability</category>
      <category>cloud</category>
      <category>finops</category>
    </item>
    <item>
      <title>OpenTelemetry with Next.js, Node.js and Kubernetes: A Practical Production Setup</title>
      <dc:creator>Modulis</dc:creator>
      <pubDate>Thu, 05 Nov 2026 11:46:17 +0000</pubDate>
      <link>https://dev.to/modulis/opentelemetry-with-nextjs-nodejs-and-kubernetes-a-practical-production-setup-cl7</link>
      <guid>https://dev.to/modulis/opentelemetry-with-nextjs-nodejs-and-kubernetes-a-practical-production-setup-cl7</guid>
      <description>&lt;p&gt;When a production issue occurs, finding the actual cause can be harder than fixing it.&lt;/p&gt;

&lt;p&gt;A request might start in a Next.js frontend, pass through multiple Node.js services, hit a database, and eventually fail somewhere along the way.&lt;/p&gt;

&lt;p&gt;You might have logs in one place, traces in another, and error reports somewhere else.&lt;/p&gt;

&lt;p&gt;Without proper instrumentation and correlation, debugging becomes a manual exercise.&lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;OpenTelemetry (OTel)&lt;/strong&gt; becomes useful.&lt;/p&gt;

&lt;p&gt;OpenTelemetry provides a vendor-neutral way to collect traces, metrics, and logs from your applications. Once your applications are instrumented, you can change telemetry backends without rewriting your instrumentation.&lt;/p&gt;

&lt;p&gt;In this guide, we'll set up OpenTelemetry for a practical production stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js frontend&lt;/li&gt;
&lt;li&gt;Node.js / Express backend&lt;/li&gt;
&lt;li&gt;Distributed tracing&lt;/li&gt;
&lt;li&gt;Logs connected to traces&lt;/li&gt;
&lt;li&gt;Kubernetes OpenTelemetry Collector&lt;/li&gt;
&lt;li&gt;Filtering and sensitive-data scrubbing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the end, you'll have a foundation for understanding what's happening across your services.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Start with consistent service naming
&lt;/h2&gt;

&lt;p&gt;Before installing any packages, establish consistent naming across your services.&lt;/p&gt;

&lt;p&gt;OpenTelemetry uses resource attributes to describe which service is generating telemetry.&lt;/p&gt;

&lt;p&gt;Here are four attributes worth configuring:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attribute&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;service.name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;checkout-api&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Identifies the service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;service.namespace&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;storefront&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Groups related services&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;service.version&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.42.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Connects errors with deployments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;deployment.environment.name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;production&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Separates production and staging&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Set these through environment variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;OTEL_SERVICE_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;checkout-api

&lt;span class="nv"&gt;OTEL_RESOURCE_ATTRIBUTES&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;service.namespace&lt;span class="o"&gt;=&lt;/span&gt;storefront,service.version&lt;span class="o"&gt;=&lt;/span&gt;1.42.0,deployment.environment.name&lt;span class="o"&gt;=&lt;/span&gt;production

&lt;span class="nv"&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://otel-collector.observability.svc.cluster.local:4318

&lt;span class="nv"&gt;OTEL_EXPORTER_OTLP_PROTOCOL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http/protobuf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;A useful practice:&lt;/strong&gt; Set &lt;code&gt;service.version&lt;/code&gt; to your Git SHA or release tag through your CI/CD pipeline.&lt;/p&gt;

&lt;p&gt;When an error starts appearing after a deployment, you'll have a much easier time connecting the incident to the relevant release.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Instrument your Next.js application
&lt;/h2&gt;

&lt;p&gt;Next.js supports OpenTelemetry through its instrumentation file.&lt;/p&gt;

&lt;p&gt;One straightforward approach is using &lt;code&gt;@vercel/otel&lt;/code&gt;. Despite the package name, it also works when running Next.js on your own infrastructure.&lt;/p&gt;

&lt;p&gt;Install the dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @vercel/otel @opentelemetry/api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create an &lt;code&gt;instrumentation.ts&lt;/code&gt; file in your project root (or inside &lt;code&gt;src/&lt;/code&gt; if your application uses that directory).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;registerOTel&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@vercel/otel&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;registerOTel&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;serviceName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OTEL_SERVICE_NAME&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;web-frontend&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This provides instrumentation for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incoming requests&lt;/li&gt;
&lt;li&gt;Server-side rendering&lt;/li&gt;
&lt;li&gt;Route handlers&lt;/li&gt;
&lt;li&gt;Server-side fetch calls&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The exporter uses the standard &lt;code&gt;OTEL_EXPORTER_OTLP_*&lt;/code&gt; environment variables configured earlier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add custom spans
&lt;/h3&gt;

&lt;p&gt;Automatic instrumentation is useful, but sometimes you need additional context around specific business operations.&lt;/p&gt;

&lt;p&gt;For example, consider a recommendation service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;trace&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@opentelemetry/api&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tracer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;trace&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTracer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;web-frontend&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getRecommendations&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;tracer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startActiveSpan&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;getRecommendations&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app.recommendation.source&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ml-service&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
        &lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchRecommendations&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;recordException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="kd"&gt;as &lt;/span&gt;&lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a custom span around the operation and records exceptions when something goes wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Avoid adding sensitive or high-cardinality values such as raw user IDs to span attributes unless there is a justified reason and appropriate data handling.&lt;/p&gt;

&lt;p&gt;Also remember that server-side instrumentation and browser-side tracing are separate concerns. Edge runtime instrumentation has limitations, so consider your runtime requirements when designing the setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Instrument your Node.js / Express API
&lt;/h2&gt;

&lt;p&gt;For a Node.js service, the OpenTelemetry Node SDK and auto-instrumentation packages provide a practical starting point.&lt;/p&gt;

&lt;p&gt;They can automatically instrument supported libraries such as HTTP clients, Express, database clients, Redis and gRPC.&lt;/p&gt;

&lt;p&gt;Install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  @opentelemetry/sdk-node &lt;span class="se"&gt;\&lt;/span&gt;
  @opentelemetry/api &lt;span class="se"&gt;\&lt;/span&gt;
  @opentelemetry/auto-instrumentations-node &lt;span class="se"&gt;\&lt;/span&gt;
  @opentelemetry/exporter-trace-otlp-http &lt;span class="se"&gt;\&lt;/span&gt;
  @opentelemetry/exporter-metrics-otlp-http &lt;span class="se"&gt;\&lt;/span&gt;
  @opentelemetry/sdk-metrics
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create an &lt;code&gt;instrumentation.js&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NodeSDK&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@opentelemetry/sdk-node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;getNodeAutoInstrumentations&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@opentelemetry/auto-instrumentations-node&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;OTLPTraceExporter&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@opentelemetry/exporter-trace-otlp-http&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;OTLPMetricExporter&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@opentelemetry/exporter-metrics-otlp-http&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;PeriodicExportingMetricReader&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@opentelemetry/sdk-metrics&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;NodeSDK&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;traceExporter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OTLPTraceExporter&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;

  &lt;span class="na"&gt;metricReader&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;PeriodicExportingMetricReader&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;exporter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OTLPMetricExporter&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;exportIntervalMillis&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;

  &lt;span class="na"&gt;instrumentations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;getNodeAutoInstrumentations&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@opentelemetry/instrumentation-fs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;SIGTERM&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shutdown&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Load instrumentation before your application
&lt;/h3&gt;

&lt;p&gt;This is one of the most important implementation details.&lt;/p&gt;

&lt;p&gt;OpenTelemetry auto-instrumentation needs to initialize before the application modules load. Otherwise, it might not correctly hook into Express, database clients or other libraries.&lt;/p&gt;

&lt;p&gt;For a CommonJS application, start your service like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;--require&lt;/span&gt; ./instrumentation.js server.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your Dockerfile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["node", "--require", "./instrumentation.js", "server.js"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a zero-code approach, the auto-instrumentation package can also register itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;--require&lt;/span&gt; @opentelemetry/auto-instrumentations-node/register server.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're using ES modules (&lt;code&gt;"type": "module"&lt;/code&gt;), check the OpenTelemetry JavaScript documentation for the appropriate ESM loader configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Connect logs with traces
&lt;/h2&gt;

&lt;p&gt;Collecting traces and logs independently is useful.&lt;/p&gt;

&lt;p&gt;Connecting them is much more powerful.&lt;/p&gt;

&lt;p&gt;Imagine an API request that takes several seconds to complete.&lt;/p&gt;

&lt;p&gt;Your trace tells you which operation was slow, but your application logs might contain the actual error or business context.&lt;/p&gt;

&lt;p&gt;The goal is to have every relevant log line carry the &lt;code&gt;trace_id&lt;/code&gt; of the request that generated it.&lt;/p&gt;

&lt;p&gt;For example, with Pino:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pino&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pino&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;logger&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;pino&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/checkout&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;cartSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;checkout started&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the appropriate OpenTelemetry log instrumentation and request context, the resulting log record can include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"msg"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"checkout started"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cartSize"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"trace_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"4bf92f..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"span_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"00f067..."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are two practical ways to collect these logs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Continue writing logs to stdout and let a log collector, such as the OpenTelemetry Collector's &lt;code&gt;filelog&lt;/code&gt; receiver, collect them.&lt;/li&gt;
&lt;li&gt;Export logs directly through OTLP from the SDK.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Either approach can work.&lt;/p&gt;

&lt;p&gt;The important part is maintaining trace context so that you can move from a trace to its corresponding logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Deploy an OpenTelemetry Collector on Kubernetes
&lt;/h2&gt;

&lt;p&gt;Your applications can export telemetry directly to a backend.&lt;/p&gt;

&lt;p&gt;However, putting an OpenTelemetry Collector between your applications and the backend gives you much better control over the telemetry pipeline.&lt;/p&gt;

&lt;p&gt;A Collector allows you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Filter noisy health-check traffic.&lt;/li&gt;
&lt;li&gt;Remove sensitive attributes before export.&lt;/li&gt;
&lt;li&gt;Batch telemetry.&lt;/li&gt;
&lt;li&gt;Retry exports when a backend becomes temporarily unavailable.&lt;/li&gt;
&lt;li&gt;Change telemetry backends without modifying every application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Kubernetes deployments, you can use the OpenTelemetry Helm chart or OpenTelemetry Operator.&lt;/p&gt;

&lt;p&gt;The following is a starting configuration using the &lt;code&gt;otelcol-contrib&lt;/code&gt; distribution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Collector configuration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;receivers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;otlp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;protocols&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;grpc&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;endpoint&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0:4317&lt;/span&gt;
      &lt;span class="na"&gt;http&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;endpoint&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0:4318&lt;/span&gt;

&lt;span class="na"&gt;processors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;memory_limiter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;check_interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1s&lt;/span&gt;
    &lt;span class="na"&gt;limit_percentage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;80&lt;/span&gt;
    &lt;span class="na"&gt;spike_limit_percentage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;

  &lt;span class="na"&gt;filter/healthchecks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;error_mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ignore&lt;/span&gt;
    &lt;span class="na"&gt;traces&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;span&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;attributes["url.path"]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;==&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;"/healthz"'&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;attributes["url.path"]&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;==&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;"/readyz"'&lt;/span&gt;

  &lt;span class="na"&gt;attributes/scrub&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;actions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http.request.header.authorization&lt;/span&gt;
        &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;delete&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http.request.header.cookie&lt;/span&gt;
        &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;delete&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;user.email&lt;/span&gt;
        &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hash&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;enduser.id&lt;/span&gt;
        &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hash&lt;/span&gt;

  &lt;span class="na"&gt;batch&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;send_batch_size&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8192&lt;/span&gt;
    &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;5s&lt;/span&gt;

&lt;span class="na"&gt;exporters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;otlphttp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;endpoint&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://YOUR-OTLP-BACKEND:4318&lt;/span&gt;

&lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pipelines&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;traces&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;receivers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;otlp&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;processors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;memory_limiter&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;filter/healthchecks&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;attributes/scrub&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;batch&lt;/span&gt;
      &lt;span class="na"&gt;exporters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;otlphttp&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

    &lt;span class="na"&gt;metrics&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;receivers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;otlp&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;processors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;memory_limiter&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;batch&lt;/span&gt;
      &lt;span class="na"&gt;exporters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;otlphttp&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

    &lt;span class="na"&gt;logs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;receivers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;otlp&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;processors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;memory_limiter&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;attributes/scrub&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;batch&lt;/span&gt;
      &lt;span class="na"&gt;exporters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;otlphttp&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the exporter endpoint with your actual backend endpoint.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this configuration matters
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Memory limiter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Helps protect the Collector from excessive memory usage. It should be placed early in each pipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Health-check filtering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Removes &lt;code&gt;/healthz&lt;/code&gt; and &lt;code&gt;/readyz&lt;/code&gt; spans from the trace pipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sensitive-data scrubbing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Removes authorization and cookie headers and hashes selected user attributes before export.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Batch processing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Groups telemetry records before exporting them.&lt;/p&gt;

&lt;p&gt;One important consideration: filtering and scrubbing policies should be reviewed against your application's actual data and security requirements.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional improvements
&lt;/h3&gt;

&lt;p&gt;Once the basic setup is working, consider adding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tail sampling to retain important error and slow traces while sampling healthy traffic.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;k8sattributes&lt;/code&gt; processor to enrich telemetry with Kubernetes pod, namespace and deployment metadata.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These additions can help make the telemetry pipeline more useful as your infrastructure grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Verify that your instrumentation works
&lt;/h2&gt;

&lt;p&gt;Don't assume that a running Collector means your instrumentation is correct.&lt;/p&gt;

&lt;p&gt;Generate some application traffic and check the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Every service appears with its actual &lt;code&gt;service.name&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;[ ] A request through Next.js and the API appears as one distributed trace.&lt;/li&gt;
&lt;li&gt;[ ] Log lines contain the same &lt;code&gt;trace_id&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;[ ] Health-check spans are filtered out.&lt;/li&gt;
&lt;li&gt;[ ] Authorization headers and raw emails are not present in exported span attributes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Common problems
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Likely cause&lt;/th&gt;
&lt;th&gt;What to check&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;unknown_service&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Service name missing&lt;/td&gt;
&lt;td&gt;Set &lt;code&gt;OTEL_SERVICE_NAME&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No Express or database spans&lt;/td&gt;
&lt;td&gt;Instrumentation loaded too late&lt;/td&gt;
&lt;td&gt;Use &lt;code&gt;--require&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Traces split between services&lt;/td&gt;
&lt;td&gt;Context propagation failure&lt;/td&gt;
&lt;td&gt;Check &lt;code&gt;traceparent&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Increasing telemetry costs&lt;/td&gt;
&lt;td&gt;High-cardinality attributes&lt;/td&gt;
&lt;td&gt;Remove unnecessary IDs and full URLs from metric attributes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data missing during shutdown&lt;/td&gt;
&lt;td&gt;SDK not flushed&lt;/td&gt;
&lt;td&gt;Call &lt;code&gt;sdk.shutdown()&lt;/code&gt; on SIGTERM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Collector restarts&lt;/td&gt;
&lt;td&gt;Memory pressure&lt;/td&gt;
&lt;td&gt;Configure &lt;code&gt;memory_limiter&lt;/code&gt; early in pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If traces are breaking between services, check whether the outgoing request is using an instrumented client and whether an intermediate proxy is preserving the &lt;code&gt;traceparent&lt;/code&gt; header.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. What happens after OpenTelemetry is configured?
&lt;/h2&gt;

&lt;p&gt;At this point, you have established the telemetry foundation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your applications emit traces and metrics.&lt;/li&gt;
&lt;li&gt;Logs carry trace context.&lt;/li&gt;
&lt;li&gt;The Collector filters and processes telemetry.&lt;/li&gt;
&lt;li&gt;Sensitive attributes are handled before export.&lt;/li&gt;
&lt;li&gt;Your backend receives correlated signals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But collecting telemetry is only one part of production debugging.&lt;/p&gt;

&lt;p&gt;When an incident occurs, engineers still need to connect the relevant error, trace, logs, user session and deployment context to understand what actually happened.&lt;/p&gt;

&lt;p&gt;This is where having correlated engineering signals becomes valuable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connecting your OpenTelemetry setup to Modulis
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://modulis.ai" rel="noopener noreferrer"&gt;Modulis&lt;/a&gt; is an engineering intelligence and incident-resolution platform built on OpenTelemetry.&lt;/p&gt;

&lt;p&gt;It runs inside your own cloud and correlates production errors, traces, logs, session replays and Git metadata.&lt;/p&gt;

&lt;p&gt;Once your application is instrumented, you can connect your Collector to the Modulis OTLP endpoint provided during setup.&lt;/p&gt;

&lt;p&gt;Add the following resource attribute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;OTEL_RESOURCE_ATTRIBUTES&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;modulis.application&lt;span class="o"&gt;=&lt;/span&gt;storefront,service.namespace&lt;span class="o"&gt;=&lt;/span&gt;storefront,service.version&lt;span class="o"&gt;=&lt;/span&gt;1.42.0,deployment.environment.name&lt;span class="o"&gt;=&lt;/span&gt;production
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;modulis.application&lt;/code&gt; isn't configured, Modulis falls back to &lt;code&gt;service.namespace&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;With the telemetry connected, Modulis brings the related engineering context together. Its AI resolution workflow uses your own model key to identify likely root causes and open PR-ready fixes for your engineers to review and merge.&lt;/p&gt;

&lt;p&gt;The deployment runs in your own cloud, and AI resolution uses your own model key.&lt;/p&gt;

&lt;p&gt;You can explore the platform at &lt;a href="https://modulis.ai" rel="noopener noreferrer"&gt;modulis.ai&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;OpenTelemetry provides a solid foundation for understanding what happens across distributed applications.&lt;/p&gt;

&lt;p&gt;For teams running Next.js, Node.js and Kubernetes, a well-configured setup can make production debugging considerably more structured.&lt;/p&gt;

&lt;p&gt;Start with consistent resource attributes, instrument your applications, connect logs to traces, and introduce a Collector to control the telemetry pipeline.&lt;/p&gt;

&lt;p&gt;Most importantly, verify the entire request path instead of assuming that individual services are correctly instrumented.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Collecting telemetry is the first step. Making it useful during an actual production incident is the real goal.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Original implementation guide: &lt;a href="https://modulis.ai/blog/opentelemetry-nextjs-nodejs-setup-guide/" rel="noopener noreferrer"&gt;https://modulis.ai/blog/opentelemetry-nextjs-nodejs-setup-guide/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opentelemetry</category>
      <category>devops</category>
      <category>kubernetes</category>
      <category>node</category>
    </item>
  </channel>
</rss>
