본문 바로가기

Agent

(4)
[Agent] java.lang.management 설명 java.lang.management 패키지 https://docs.oracle.com/en/java/javase/21/docs/api/java.management/java/lang/management/package-summary.html java.lang.management (Java SE 21 & JDK 21) package java.lang.management Provides the management interfaces for monitoring and management of the Java virtual machine and other components in the Java runtime. It allows both local and remote monitoring and managem..
[Agent] Agent 동작 구성 및 이해 Agent 개발 Instrumentation 인터페이스 API reference for Java Platform, Instrumentation Instrumentation (Java SE 17 & JDK 17) public interface Instrumentation This class provides services needed to instrument Java programming language code. Instrumentation is the addition of byte-codes to methods for the purpose of gathering data to be utilized by tools. Since the changes are pur docs.oracle.com 이 인터페이스..
[troubleshooting][ClassLoader]동적 클래스로더와 계층 관계 개요와 문제 상황 Instrument API를 사용한 개발 도중, 기본 클래스로더가 아닌, 내가 만든 ClassLoader를 사용하여 동적 클래스를 로드하려고 시도하였다. 이 과정에서 확인차 ForName 등으로 Class 정보를 가져왔는데, 새롭게 얻은 지식을 정리하고자 한다. premain public static void premain(String agentArgs, Instrumentation instrumentation) { Banner.send(agentArgs); //로그 찍기 ConfigRead configRead = new ConfigRead(); //Config Read //CallThread.run(); JMX 쓰레드 생성 및 호출 //새로운 클래스를 생성하는 로직 try { Make..
[TroubleShooting][ASM][HikariCP] HikariCP 기반 Springboot 트랜잭션 로그 수집 - 1 개요 HikariCP는 고성능 JDBC 커넥션 풀 라이브러리로, Spring Boot에서 널리 사용되며, DB 연결 관리를 최적화하기 위해 설계되었다. Spring Boot는 HikariCP를 기본적인 DataSource 구현체로 사용한다. (Spring Boot 2.0 이상 버전부터 HikariCP가 기본 Connection Pool로 설정되어 있다.) 이는 Spring Boot의 자동 구성 메커니즘을 통해 제공되며, 특별한 설정 없이도 HikariCP를 사용할 수 있게 해준다. 사용자는 application.properties 또는 application.yml 파일에서 HikariCP에 대한 세부 설정을 조정할 수 있다. HikariCP는 JDBC의 javax.sql.DataSource 인터페이스를 ..