Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

02-02. Spring Boot Application에 'ApplicationInsights-agent' 폴더를 만들고 jar파일을 위치 시킵니다.

Code Block
languagejs
titleapplicationinsights.json
{
  "connectionString": "InstrumentationKey=23bb2ca3-8a38-4a3c-b5b5-f45f2ea33a7d;IngestionEndpoint=https://koreacentral-0.in.applicationinsights.azure.com/"
}
Code Block
languagexml
titleAI-Agent.xml
<?xml version="1.0" encoding="utf-8"?>
<ApplicationInsightsAgent>
    <Instrumentation>
        <BuiltIn enabled="true">

            <!-- capture logging via Log4j 1.2, Log4j2, and Logback, default is true -->
            <Logging enabled="true" />

            <!-- capture outgoing HTTP calls performed through Apache HttpClient, OkHttp,
                 and java.net.HttpURLConnection, default is true -->
            <HTTP enabled="true" />

            <!-- capture JDBC queries, default is true -->
            <JDBC enabled="true" />

            <!-- capture Redis calls, default is true -->
            <Jedis enabled="true" />

            <!-- capture query plans for JDBC queries that exceed this value (MySQL, PostgreSQL),
                 default is 10000 milliseconds -->
            <MaxStatementQueryLimitInMS>1000</MaxStatementQueryLimitInMS>

        </BuiltIn>
    </Instrumentation>
</ApplicationInsightsAgent>

02-03. JVM환경변수로 javaagent를 설정합니다.

...