admin管理员组文章数量:1415637
I have 5 Container Apps (CAs) that belong to the same Container App Environment.
Is there a way to prevent a specific CA from emitting logs to my Log Analytics?
Currently, Azure does not support multi-line logs so when that CA raises an error I get about 20 lines for a single error (due to the traceback being shown in different lines). Meaning my costs are x20 for those logs.
The logs are emitted by the Container App console and used by an Application Insights.
CAE diagnostic setting
doesn't have an option to disable specific CA logs either.
I have 5 Container Apps (CAs) that belong to the same Container App Environment.
Is there a way to prevent a specific CA from emitting logs to my Log Analytics?
Currently, Azure does not support multi-line logs so when that CA raises an error I get about 20 lines for a single error (due to the traceback being shown in different lines). Meaning my costs are x20 for those logs.
The logs are emitted by the Container App console and used by an Application Insights.
CAE diagnostic setting
doesn't have an option to disable specific CA logs either.
1 Answer
Reset to default 1To filter container logs from specific containers, you can use configmap
approach as detailed here in the MSDoc.
In general, there are two data collection configuration methods to collect logs in container insights. One is with DCR, and the other one is config map.
Using ConfigMap, you can configure the collection of
stderr
andstdout
logs separately for the cluster, so you can choose to enable one and not the other.
Firstly, you can get a config map yaml file template and add the necessary configuration changes according to your requirement.
In order to exlclude namespace, you can add the container details under exclude_namespaces
stdout in the yaml file as shown below.
[log_collection_settings]
[log_collection_settings.stdout] enabled = true
exclude_namespaces = [....]
Refer MSDoc for the available configuration methods and also detailed steps of data collection using config map.
You can also create a config map with kubectl
commands and proceed further as shown below.
本文标签: Filter out logs from specific Azure Container AppStack Overflow
版权声明:本文标题:Filter out logs from specific Azure Container App - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745240505a2649299.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
Container App console logs
. – Thomas Commented Feb 5 at 19:35