-
Notifications
You must be signed in to change notification settings - Fork 1
[ICC-242] 스카우터 스크립트 작성, 파일 추가 #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
5883f86
7bc5c8a
b849c87
f376d42
e8bc189
c925d18
8ad47be
fbc106c
817bdb0
08347e6
2bfd524
4f84d5e
c09831e
5c3824a
22bd6ac
ff43503
c3f30dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,4 +21,4 @@ services: | |
| environment: | ||
| - SPRING_PROFILES_ACTIVE=prod,green | ||
| ports: | ||
| - "${GREEN_PORT}:8080" | ||
| - "${GREEN_PORT}:8080" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,5 +42,5 @@ out/ | |
| .env | ||
| app/gradle.properties | ||
| app/newrelic/newrelic.yml | ||
| /heapdump | ||
| **/heapdump | ||
| monitor_downtime.sh | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| ### scouter java agent configuration sample | ||
| #obj_name=WAS-01 | ||
| #net_collector_ip=127.0.0.1 | ||
| #net_collector_udp_port=6100 | ||
| #net_collector_tcp_port=6100 | ||
| #hook_method_patterns=sample.mybiz.*Biz.*,sample.service.*Service.* | ||
| #trace_http_client_ip_header_key=X-Forwarded-For | ||
| #profile_spring_controller_method_parameter_enabled=false | ||
| #hook_exception_class_patterns=my.exception.TypedException | ||
| #profile_fullstack_hooked_exception_enabled=true | ||
| #hook_exception_handler_method_patterns=my.AbstractAPIController.fallbackHandler,my.ApiExceptionLoggingFilter.handleNotFoundErrorResponse | ||
| #hook_exception_hanlder_exclude_class_patterns=exception.BizException |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| objName=test-case-scouter |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [args] | ||
| // void capArgs(WrContext $ctx, HookArgs $hook) | ||
|
|
||
| [return] | ||
| // void capReturn(WrContext $ctx, HookReturn $hook) | ||
|
|
||
|
|
||
| [this] | ||
| // void capThis(WrContext $ctx, String $class, String $desc, Object $this) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [counter] | ||
| //public void counter(scouter.lang.pack.PerfCounterPack $pack) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [call] | ||
| // void call(WrContext $ctx, WrHttpCallRequest $req) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| [start] | ||
| // void start(WrContext $ctx, WrRequest $req, WrResponse $res) | ||
|
|
||
|
|
||
|
|
||
| [end] | ||
| // void end(WrContext $ctx, WrRequest $req, WrResponse $res) | ||
|
|
||
|
|
||
| [reject] | ||
| // boolean reject(WrContext $ctx, WrRequest $req, WrResponse $res) | ||
| return false; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [url] | ||
| // String url(WrContext $ctx, String $msg, Object $pool) | ||
|
|
||
| return null; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,138 @@ | ||
| ## Javaagent Plugin | ||
| - Default File Location : ${directory of scouter.agent.jar}/plugin | ||
| - Dynamic application | ||
| - By java code | ||
| - Plugin 종류 | ||
| - Http-service | ||
| - Service | ||
| - HttpCall | ||
| - Capture | ||
| - JDBC-Pool | ||
|
|
||
| ### Http-service Plugin(httpservice.plug) | ||
|
|
||
| 1. void start(WrContext $ctx, WrRequest $req, WrResponse $res) : Http Service 시작 시점 | ||
| 2. void end(WrContext $ctx, WrRequest $req, WrResponse $res) : Http Service 종료 시점 | ||
| 3. boolean reject(WrContext $ctx, WrRequest $req, WrResponse $res) : Http Service 시작 시점에 reject 조건 (default : false) | ||
|
|
||
| ### Service Plugin(service.plug) | ||
| **추가적인 hooking 설정을 통해서만 동작** | ||
|
|
||
| 1. void start(WrContext $ctx, HookArgs $hook) : Service 시작 시점 | ||
| 2. void end(WrContext $ctx) : Service 종료 시점 | ||
|
|
||
| ### HttpCall Plugin(httpcall.plug) | ||
|
|
||
| 1. void call(WrContext $ctx, WrHttpCallRequest $req) : Http Call 요청 시점 | ||
|
|
||
| ### Capture Plugin(capture.plug) | ||
| **추가적인 hooking 설정을 통해서만 동작** | ||
|
|
||
| 1. void capArgs(WrContext $ctx, HookArgs $hook) : Method 시작 시점 | ||
| 2. void capReturn(WrContext $ctx, HookReturn $hook) : Method Return 시점 | ||
| 3. void capThis(WrContext $ctx, String $class, String $desc, Object $this) : Constructor 생성 시점 | ||
|
Comment on lines
+1
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Address markdownlint MD007/MD036 in lists and headings. Also applies to: 43-136 🧰 Tools🪛 markdownlint-cli2 (0.18.1)2-2: Unordered list indentation (MD007, ul-indent) 3-3: Unordered list indentation (MD007, ul-indent) 4-4: Unordered list indentation (MD007, ul-indent) 5-5: Unordered list indentation (MD007, ul-indent) 6-6: Unordered list indentation (MD007, ul-indent) 7-7: Unordered list indentation (MD007, ul-indent) 8-8: Unordered list indentation (MD007, ul-indent) 9-9: Unordered list indentation (MD007, ul-indent) 10-10: Unordered list indentation (MD007, ul-indent) 19-19: Emphasis used instead of a heading (MD036, no-emphasis-as-heading) 29-29: Emphasis used instead of a heading (MD036, no-emphasis-as-heading) 🤖 Prompt for AI Agents |
||
|
|
||
| ### JDBC-Pool Plugin(jdbcpool.plug) | ||
|
|
||
| 1. String url(WrContext $ctx, String $msg, Object $pool) | ||
| : DB Connection URL 요청 시점 | ||
|
|
||
|
|
||
| ## API | ||
|
|
||
| ### Common API | ||
| - void log(Object c) : Logger를 통한 log | ||
| - void println(Object c) : System.out를 통한 log | ||
| - Object field(Object o, String field) : Object의 filed 값을 가져옴 | ||
| - Object method(Object o, String method) : Object의 method를 강제invoke 함 | ||
| - Object method1(Object o, String method) : Object의 method를 invoke 함 | ||
| - Object method(Object o, String method, String param) : Object의 method를 String 파라미터와 함께 invoke 함 | ||
| - String toString(Object o) : Object 를 toString 하여 반환 | ||
| - String toString(Object o, String def) : Object 를 toString 하여 반환, null 이면 default string 반환 | ||
| - void alert(char level, String title, String message) : Alert 을 보냄 | ||
| - int syshash(Object o) : Object 의 identityHash 값 반환 | ||
| - int syshash(HookArgs hook, int x) : Arguments의 i 인덱스의 identyHash 값 반환 | ||
| - int syshash(HookArgs hook) : This 의 identyHash 값 반환 | ||
| - void forward(WrContext wctx, int uuid) : Async Thread 를 App service로 연결 | ||
| - void forwardThread(WrContext wctx, int uuid) : Async Thread 를 Background service로 연결 | ||
| - void receive(WrContext ctx, int uuid) : 앞서 등록된 Service가 있으면 연결 | ||
|
|
||
|
|
||
| ### WrContext class API | ||
| - String service() : Service Name 을 반환 | ||
| - void service(String name) : Service Name 을 set | ||
| - int serviceHash() : Service Hash 값을 반환 | ||
| - void remoteIp(String ip) : Remote IP 을 set | ||
| - String remoteIp() : Remote IP를 반환 | ||
| - void error(String err) : 임의의 error 를 주입 | ||
| - boolean isError() : 에러 체크 | ||
| - void group(String group) : 임의의 group을 set | ||
| - String group() : Group을 반환 | ||
| - void login(String id) : 임의의 사용자 ID 를 set | ||
| - String login() : 사용자 ID를 반환 | ||
| - void desc(String desc) : 임의의 Desc를 set | ||
| - String desc() : Desc를 반환 | ||
| - String httpMethod() : Http Method를 반환 | ||
| - String httpQuery() : Http Query를 반환 | ||
| - String httpContentType() : Http Content-type을 반환 | ||
| - String userAgent() : User-Agent를 반환 | ||
| - void profile(String msg) : Msg 를 profile에 기록 | ||
| - long txid() : txid 를 반환 | ||
| - long gxid() : gxid 를 반환 | ||
| - TraceContext inner() : context를 반환 | ||
|
|
||
| ### WrRequest class API | ||
| - String getCookie(String key) : Cookie 값을 반환 | ||
| - String getRequestURI() : Request URI를 반환 | ||
| - String getRemoteAddr() : Remote Address를 반환 | ||
| - String getMethod() : Method 를 반환 | ||
| - String getQueryString() : Query String을 반환 | ||
| - String getParameter(String key) : Parameter를 반환 | ||
| - Object getAttribute(String key) : Attribute를 반환 | ||
| - String getHeader(String key) : Header값을 반환 | ||
| - Enumeration getParameterNames() : Parameter 값들을 반환 | ||
| - Enumeration getHeaderNames() : HeaderName들을 반환 | ||
| - WrSession getSession() : WrSession객체를 반환 | ||
| - Set getSessionNames() : Session Name들을 반환 | ||
| - Object getSessionAttribute(String key) : Session 값을 반환 | ||
| - Object inner() : Request Object를 반환 | ||
| - boolean isOk() : Plugin 상태 확인 | ||
| - Throwable error() : Error 확인 | ||
|
|
||
| ### WrResponse class API | ||
| - PrintWriter getWriter() : Writer를 반환 | ||
| - String getContentType() : Content-type을 반환 | ||
| - String getCharacterEncoding() : Character-encoding을 반환 | ||
| - Object inner() : Response Object를 반환 | ||
| - boolean isOk() : Plugin 상태 확인 | ||
| - Throwable error() : Error 확인 | ||
|
|
||
| ### WrSession class API | ||
| - getAttribute(String key) : Attribute를 반환 | ||
| - Enumeration getAttributeNames() : Attribute Names를 반환 | ||
| - Object inner() : Session Object를 반환 | ||
| - boolean isOk() : Plugin 상태 확인 | ||
| - Throwable error() : Error 확인 | ||
|
|
||
| ### WrHttpCallRequest class API | ||
| - void header(Object key, Object value) : Header값 추가 | ||
| - Object inner() : Request Object를 반환 | ||
| - boolean isOk() : Plugin 상태 확인 | ||
| - Throwable error() : Error 확인 | ||
|
|
||
| ### HookArgs class API | ||
| - String getClassName() : Class 이름 반환 | ||
| - String getMethodName() : Method 이름 반환 | ||
| - String getMethodDesc() : Method 의 Desc 반환 | ||
| - Object getThis() : this object 반환 | ||
| - Object[] getArgs() : Arguments 반환 | ||
| - int getArgCount() : Argument 갯수 반환 | ||
|
|
||
| ### HookReturn class API | ||
| - String getClassName() : Class 이름 반환 | ||
| - String getMethodName() : Method 이름 반환 | ||
| - String getMethodDesc() : Method 의 Desc 반환 | ||
| - Object getThis() : this object 반환 | ||
| - Object getReturn() : Return 값 반환 | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v 1.6.3등 태그가 이 아니여도 실행중 컨테이너가 가지고있는 이미지가 아니라면 지우게함