How to change log level for Java Agent logs in Azure Application Insights?

Kim 11 Reputation points
2021-01-21T08:52:32.893+00:00

Hi,

we have a Java Spring Boot WebApp (App Service) running in a Linux environment on Azure, which uses slf4j/Logback for logging.
These logs should be displayed in our Application Insights. Therefore I followed this documentation https://learn.microsoft.com/de-de/azure/azure-monitor/app/java-standalone-config. I found different docs relating to logging in App Insights, but that one seemed to be the latest one or at least the one most applicable for us.

Using the applicationinsights-agent-3.0.0 seems to work, because I can see all warnings and errors we log in our application within App Insights. The problem is, that I want to see all logs with at least log level INFO, but that is not the case. The documentation says that the App Insights threshold default is INFO and it says I can change it via the applicationinsights.json or the environment variable APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL.
I tried both, but still can't see any INFO logs in Insights.

The logging level of our application itself seems to be correct, because I can see all my expected logs within the LogStream.
What am I missing here?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,647 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,937 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2021-01-25T16:59:30.803+00:00

    Hi @Kim ,

    There was a bug identified in version 3.0 that could be the culprit of your issue. Upgrade your package to version 3.0.2. If you continue to see the issue, please comment down below.

    Regards,
    Ryan


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.