본문 바로가기

프로젝트

(77)
작업 중 발생한 Redis 동시성 문제 발생과 처리 Collector 모듈 동작 중 동시성 문제가 발생했다.원인은 꽤 명확한 것인데, Redis 객체 insert에 해당하는 Collection 객체가 Synchronized하지 않기 때문.   ... //스케줄러 동작 여하에 따라 데이터 임시 보관용 List private final List keepedMetricDtos = new ArrayList(); //Metric Table private final List keepedEtcDtos = new ArrayList(); //예외 체크용 //Redis Saver private final MetricRedisSaver metricRedisSaver = new MetricRedisSaver(); //Psql pri..
간단하게 Node와 bootStrap으로 정적 FE 웹 사이트 만들기 사전 설정 https://nodejs.org/en/download/current Node.js — Download Node.js®Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.nodejs.org Express 설치 : Express는 Node.js를 위한 가벼운 웹 프레임워크다. 이를 설치하기 위해 다음 명령을 실행한다.npm install express server.js는 다음과 같이 설정했다.const express = require('express');const app = express();app.get('/', (req, res) => { res.send('Hello World!');});const PORT = p..
[포팅 메뉴얼] 스카우터(Scouter), 핀포인트(Pinpoint) 설치 가이드 - 1 이번 포스팅에서는, Scouter와 Pinpoint를 Linux 환경에 구축하는 메뉴얼을 작성하였다. 환경 사양의 경우 다음과 같다. 구축 환경 Diagram과 Flow 설치 환경 및 설치 버전 - CentOS 7 / windows 11(Scouter window Client) - Java 1.8 Pinpoint v2.3.3 Release v2.3.3 · pinpoint-apm/pinpoint Security Patch Release Fix Log4j2 Security Vulnerabilities CVE-2021-45105, CVE-2021-45046 Agent : log4j 2.12.3 Server module : log4j 2.17.0 Release Notes [#8510] Backport: Bump..
[Agent / ASM] agent의 transform 메서드에 ASM 바이트코드 적용하기 2 / ASM 라이브러리 이슈 ClassReader / Visiter / Writer를 사용한 값 읽어오기 public static byte[] addLogging(byte[] classfileBuffer) { ClassReader classReader = new ClassReader(classfileBuffer); // 클래스 파일 읽기 // 클래스 파일 쓰기, COMPUTE_MAXS와 COMPUTE_FRAMES 옵션으로 메서드의 최대 스택 크기와 로컬 변수를 자동 계산 ClassWriter classWriter = new ClassWriter(classReader, ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES); // Classvisitor 내부에 MethodVisitor가 있으..
개발 진행 : 메서드 변조(MethodVisitor, ClassVisitor), 로깅 PrepareStatement Search transformer를 통해 prepareStatement를 조회해보자. public class MyClassTransformer implements ClassFileTransformer { //이 인터페이스의 구현체(transform)은 JVM이 존재하는 클래스를 로드할 때마다 호출되며, 이 시점에서 바이트코드를 조사하고 변경할 수 있다. @Override public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) { if (className.contains..
[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 이 인터페이스..
[A Java bytecode engineering library]chap02 실습파일 Logic package com.sch.testapm.test.controller; import com.sch.testapm.reference.chap2.ClassPrinter; import lombok.extern.slf4j.Slf4j; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; imp..