{"id":6079,"date":"2025-09-25T09:27:35","date_gmt":"2025-09-25T16:27:35","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sql\/?p=6079"},"modified":"2026-02-23T11:34:39","modified_gmt":"2026-02-23T19:34:39","slug":"data-api-builder-16-logging","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sql\/data-api-builder-16-logging\/","title":{"rendered":"Data API builder 1.6: Flexible Logging for Every Developer"},"content":{"rendered":"<p>Previously, developers were limited to the default log levels and filters hardcoded into DAB. With release 1.6, you can now configure filters and levels for logs emitted by the engine. This release also adds new sinks. In addition to <strong>Application Insights<\/strong> and <strong>OpenTelemetry<\/strong> publishing, Data API builder now supports both <strong>file<\/strong> and <strong>Azure Log Analytics<\/strong> as targets. Rich, configurable logging wherever you need it.<\/p>\n<pre class=\"prettyprint language-json\"><code class=\"language-json\">{\n  \"telemetry\": {\n      \"log-level\": { },\n      \"open-telemetry\": { },\n      \"application-insights\": { },\n      \"azure-log-analytics\": { }, \/\/ \u2b50 new!\n      \"file\": { } \/\/ \u2b50 new!\n    }\n  }\n}<\/code><\/pre>\n<div class=\"heading-wrapper\" data-heading-level=\"h3\">\n<h2 class=\"heading-anchor\">\n    File sink (\u2b50 new!)\n  <\/h2>\n<\/div>\n<p>Until now, DAB developers were mostly limited to console logs in the container. With release 1.6, you can sink logs to local files in a container folder to systematically debug and observe DAB behavior in your preferred monitoring solution. Mounting a container volume as the target folder makes it easy to preserve logs across container lifecycles.<\/p>\n<p><strong>Example file sink configuration:<\/strong><\/p>\n<pre class=\"prettyprint language-json\"><code class=\"language-json\">{\n  \"telemetry\": {\n      \"file\": {\n        \"enabled\": ...,                   \/\/ Turn file logging on or off\n        \"path\": ...,                      \/\/ Folder path for log files\n        \"rolling-interval\": ...,          \/\/ How often a new log file is created\n        \"retained-file-count-limit\": ..., \/\/ Max number of log files to keep\n        \"file-size-limit-bytes\": ...,     \/\/ Max size of a log file before rolling\n      }\n    }\n  }\n}<\/code><\/pre>\n<div class=\"heading-wrapper\" data-heading-level=\"h3\">\n  Read the docs: <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/data-api-builder\/whats-new\/version-1-6\">What&#8217;s new for version 1.6 &#8211; Data API builder | Microsoft Learn<\/a> <\/p>\n<h2 id=\"azure-log-analytics-sink\" class=\"heading-anchor\">\n    Azure Log Analytics Sink (\u2b50 new!)\n  <\/h2>\n<\/div>\n<p>Enterprise developers often face stricter requirements than local debugging can meet. Many organizations mandate centralized logging, compliance auditing, and integration with corporate monitoring solutions. To support these scenarios, Data API builder integrates with Azure Log Analytics. Logs flow into a secure, centralized platform that aligns with enterprise policies for retention, governance, and observability.<\/p>\n<p><strong>Example Azure Log Analytics sink configuration:<\/strong><\/p>\n<pre class=\"prettyprint language-json\"><code class=\"language-json\">{\n  \"telemetry\": {\n    \"azure-log-analytics\": {\n      \"enabled\": true,                        \/\/ Turn logging on or off\n      \"auth\": {\n        \"workspace-id\": \"xyz\",                \/\/ Workspace ID\n        \"dcr-immutable-id\": \"dcr-xyz\",        \/\/ Data Collection Rule\n        \"dce-endpoint\": \"https:\/\/xyz.azure.com\" \/\/ Data Collection Endpoint\n      },\n      \"dab-identifier\": \"dab-prod-api\",       \/\/ Unique string to identify log source\n      \"flush-interval-seconds\": 30            \/\/ How often logs are flushed\n    }\n  }\n}<\/code><\/pre>\n<p><strong>Versus Application Insights<\/strong> Where Application Insights focuses on application performance monitoring (APM), Azure Log Analytics provides broader coverage. It aggregates logs from applications, Azure resources, VMs, containers, networks, and security tools. These logs are centralized in a workspace for Kusto Query Language (KQL) queries, correlation, and compliance. Read the docs: <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/data-api-builder\/whats-new\/version-1-6\">What&#8217;s new for version 1.6 &#8211; Data API builder | Microsoft Learn<\/a><\/p>\n<h2>Application Insights Azure Application Insights is a monitoring service that captures telemetry such as request details, performance counters, logs, and exceptions. Integrating it with Data API builder (DAB) helps you diagnose issues and monitor runtime behavior in production.<\/h2>\n<p><strong>Example configuration:<\/strong><\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">\"runtime\": {\n  ...\n  \"telemetry\": {\n    \"application-insights\": {\n      \"enabled\": true,\n      \"connection-string\": \"@env('app-insights-connection-string')\"\n    }\n  }\n}<\/code><\/pre>\n<p>Read the docs:<\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/data-api-builder\/concept\/monitor\/application-insights\">Use Azure Application Insights in Data API builder &#8211; Data API builder | Microsoft Learn<\/a><\/p>\n<h2>OpenTelemetry Data API builder (DAB) also supports OpenTelemetry for distributed tracing and metrics. This enables you to monitor and diagnose application behavior across REST, GraphQL, database operations, and internal middleware. Telemetry is exported via the .NET OpenTelemetry SDK to your configured backend, such as Azure Monitor or Jaeger. Ensure your backend is running and reachable at the specified<\/h2>\n<p><code>endpoint<\/code>. <strong>Example configuration:<\/strong><\/p>\n<pre class=\"prettyprint language-json\"><code class=\"language-json\">{\n    \"runtime\": {\n        \"telemetry\": {\n            \"open-telemetry\": {\n                \"enabled\": true,\n                \"endpoint\": \"http:\/\/otel-collector:4317\",\n                \"service-name\": \"dab\",\n                \"exporter-protocol\": \"grpc\"\n            }\n        }\n    }\n}\n<\/code><\/pre>\n<p>Read the docs:<\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/data-api-builder\/concept\/monitor\/open-telemetry\">Use OpenTelemetry and Activity Traces &#8211; Data API builder | Microsoft Learn<\/a><\/p>\n<h2>Filtered Log Levels Data API builder (DAB) also supports customizable, filtered log levels to help you control the verbosity and focus of logs. This lets you capture detailed diagnostics on specific components while keeping other areas quieter, improving your debugging and monitoring experience. Logging settings are configured in the<\/h2>\n<p><code>runtime.telemetry.log-level<\/code> section of your configuration. You can specify log levels globally or target specific namespaces or classes for fine-grained control. <strong>Example configuration:<\/strong><\/p>\n<pre class=\"prettyprint language-json\"><code class=\"language-json\">{\n  \"runtime\": {\n    \"telemetry\": {\n      \"log-level\": {\n        \"Azure.DataApiBuilder.Core.Configurations.RuntimeConfigValidator\": \"Debug\",\n        \"Azure.DataApiBuilder.Core\": \"Information\",\n        \"default\": \"Warning\"\n      }\n    }\n  }\n}<\/code><\/pre>\n<p>Read the docs:<\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/data-api-builder\/concept\/monitor\/log-levels\">Use Filtered Log Levels &#8211; Data API builder | Microsoft Learn<\/a><\/p>\n<h2>Conclusion With release 1.6, Data API builder provides developers with more control and flexibility over logging than ever before. From fine-grained log-level filters to new sinks like file and Azure Log Analytics, you can now capture diagnostics locally, integrate with enterprise monitoring systems, and meet compliance requirements without workarounds. Whether you\u2019re debugging in a container or analyzing trends across an enterprise environment, DAB\u2019s logging features give you the visibility and confidence to build, operate, and scale effectively. <div  class=\"d-flex justify-content-left\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/aka.ms\/dab\/docs\" target=\"_blank\">Get Started with Data API builder<\/a><\/div> <div  class=\"d-flex justify-content-left\"><a class=\"cta_button_link btn-secondary mb-24\" href=\"https:\/\/forms.office.com\/pages\/responsepage.aspx?id=v4j5cvGGr0GRqy180BHbR1S1JdzGAxhDrefV-tBYtwZUNE1RWVo0SUVMTkRESUZLMVVOS0wwUFNVRy4u\" target=\"_blank\">Join the Data API builder developer community<\/a><\/div><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>Previously, developers were limited to the default log levels and filters hardcoded into DAB. With release 1.6, you can now configure filters and levels for logs emitted by the engine. This release also adds new sinks. In addition to Application Insights and OpenTelemetry publishing, Data API builder now supports both file and Azure Log Analytics [&hellip;]<\/p>\n","protected":false},"author":96788,"featured_media":6612,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[510,560,530],"class_list":["post-6079","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sql","tag-azure-sql-database","tag-data-api-builder","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>Previously, developers were limited to the default log levels and filters hardcoded into DAB. With release 1.6, you can now configure filters and levels for logs emitted by the engine. This release also adds new sinks. In addition to Application Insights and OpenTelemetry publishing, Data API builder now supports both file and Azure Log Analytics [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/6079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/users\/96788"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/comments?post=6079"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/6079\/revisions"}],"predecessor-version":[{"id":6613,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/posts\/6079\/revisions\/6613"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media\/6612"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/media?parent=6079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/categories?post=6079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sql\/wp-json\/wp\/v2\/tags?post=6079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}