microsoft / azure-container-apps

Roadmap and issues for Azure Container Apps
MIT License
372 stars 29 forks source link

Feature Request: support 1 Log Analytics workspace per App, not per Env. #211

Closed ezYakaEagle442 closed 3 months ago

ezYakaEagle442 commented 2 years ago

Is your feature request related to a problem? Please describe.
Customers running ACA in a Corp. environment requires to deploy to a VNet. Due to the large CIDR required /16 for the VNet and /21 for the subnets, it will be shared between several Dept/Teams/Apps. The customer does not want to share the same log analytics workspace, not to mix the messages from different Apps.

Describe the solution you'd like.
1 Log Analytics workspace supported per App

Describe alternatives you've considered.
Define Log Pattern with the Dev Team to ensure an easy way to identify from what App the log message is related to, ex : MYAPP-Received data XXX

Note: it is already possible to filter a query based on the AppName to avoid any mistake on the App targeted :

az monitor log-analytics query \
  --workspace $LOG_ANALYTICS_WORKSPACE_CLIENT_ID \
  --analytics-query "ContainerAppConsoleLogs_CL | where ContainerAppName_s == '$appName' | project ContainerAppName_s, Log_s, TimeGenerated | take 3" \
  --out table
ContainerAppName_s    Log_s                                                                                                                                                                                                                                             TableName      TimeGenerated
--------------------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  -------------  ------------------------
node-app              time="2022-05-05T09:03:46.521247712Z" level=info msg="starting Dapr Runtime -- version edge -- commit 604c4cd6e3afd22502a71fa68b4e7834f8565e3a" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.runtime type=log ver=edge  PrimaryResult  2022-05-05T09:04:05.615Z
node-app              time="2022-05-05T09:03:46.521283813Z" level=info msg="log level set to: info" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.runtime type=log ver=edge                                                                    PrimaryResult  2022-05-05T09:04:05.615Z
node-app              time="2022-05-05T09:03:46.521390514Z" level=info msg="metrics server started on :9090/" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.metrics type=log ver=edge                                                          PrimaryResult  2022-05-05T09:04:05.615Z
node-app              time="2022-05-05T09:03:46.549383043Z" level=info msg="kubernetes mode configured" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.runtime type=log ver=edge                                                                PrimaryResult  2022-05-05T09:04:05.615Z
node-app              time="2022-05-05T09:03:46.549420044Z" level=info msg="app id: node-app" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.runtime type=log ver=edge                                                                          PrimaryResult  2022-05-05T09:04:05.615Z
node-app              time="2022-05-05T09:03:46.549636145Z" level=info msg="mTLS enabled. creating sidecar authenticator" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.runtime type=log ver=edge                                              PrimaryResult  2022-05-05T09:04:05.615Z
node-app              time="2022-05-05T09:03:46.549779046Z" level=info msg="trust anchors and cert chain extracted successfully" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.runtime.security type=log ver=edge                              PrimaryResult  2022-05-05T09:04:05.615Z
node-app              time="2022-05-05T09:03:46.549806447Z" level=info msg="authenticator created" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.runtime type=log ver=edge                                                                     PrimaryResult  2022-05-05T09:04:05.615Z
node-app              time="2022-05-05T09:03:46.55016445Z" level=info msg="Initialized name resolution to k8se" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.runtime type=log ver=edge                                                        PrimaryResult  2022-05-05T09:04:05.615Z
node-app              time="2022-05-05T09:03:46.550298151Z" level=info msg="loading components" app_id=node-app instance=node-app--rtyghwo-764b44cf8c-2plng scope=dapr.runtime type=log ver=edge                                                                        PrimaryResult  2022-05-05T09:04:05.615Z

Additional context.
None

BigMorty commented 2 years ago

Hello @ezYakaEagle442 - Why is the filtering which you show above not sufficient?

ghost commented 2 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.