Commit Graph

909 Commits

Author SHA1 Message Date
吴晟 Wu Sheng 8ebf3aac04
Support timeout configuration in agent and backend. (#3491)
* Support timeout configuration in agent and backend.

* Fix CI

* no message
2019-09-20 15:02:28 +08:00
wuguangkuo 60236a27d6 Add feature to control the maximum agent log files (#3475)
* Add feature to control the maximum history agent log files.
2019-09-19 14:12:17 +08:00
Louis Tsui 72f07b812a Add Light4j plugin (#3323)
* Add Light4J 1.6.x plug-in

* Add unit test for Light4J plug-in

* Add missing id to server-starter

* Remove mentions of version 1.6.x

Some local testing showed that the plugin successfully generated traces for a light4j project built with light-codegen v2.x. Therefore, there is no need for a separate plugin for v2.x and no distinction needs to be made with light4j v1.6.x.

* Update supported light4j versions

* Use ContextSnapshot to maintain trace

In a typical Light4j project, the ExceptionHandler#handleRequest is the asynchronous execution point. The flow is ExceptionHandler#handleRequest -> HttpServerExchange#dispatch -> ... -> ExceptionHandler#handleRequest. This means that handleRequest is being intercepted twice and each time a LocalSpan is created. Without handling thread propagation, the trace segment gets split up.

By saving a ContextSnapshot into the enhanced object (ExceptionHandler), we can determine if it is necessary to continue the segment.

* Update logic for span creation in trace

By default, the Light4J plugin now overrides the Undertow plugin's entry span with its own. This new entry span is created just before execution of the ExceptionHandler#handleRequest in the I/O thread. The entry span is generated here because it is considered the starting point of the Light4J handler chain.

There is now also the option to enable detailed span creation when tracing requests through Light4J. These local spans mark which middleware and business handlers are involved with handling the HTTP request to a Light4J service.

* Update skywalking version

* Update light4j version

* Fix LightInstrumentation javadoc

* Remove import violating checkstyle

This import was added from the link reference in the javadoc. The javadoc has now been changed to just reference the method name.

* Move light4j agent config property

* Sync UI
2019-09-18 21:43:17 +08:00
Jared Tan 6c347a1169 agent support custom properties. (#3367)
* agent support custom properties.
2019-09-17 14:44:42 +08:00
SummerOfServenteen c5b03ba7eb fix noSuchMethod (#3408) 2019-09-16 16:50:30 +08:00
stone.wlg bb0b3d369f provide cassandra java driver 3.x plugin (#3410)
* add cassandra java driver 3.x plugin
2019-09-12 16:14:48 -07:00
于玉桔 b5b088acc0 Gateway compatible with downstream loss (#3445) 2019-09-10 23:43:17 -07:00
hi-sb 96b2baaddb spring-cloud-gateway traceid does not transmit #3411 (#3446)
* spring-cloud-gateway traceid does not transmit #3411

skywalking-version:6.5.0

spring-gateway-version:2.1.2

Error Description:

 Customize the filter, traceid does not transmit.

 "ServerWebExchangeDecorator" is a transport chain,His structure should be like this:

	 serverWebExchangeDecorator
	    -----(ServerWebExchangeDecorator)delegate
		    ------(ServerWebExchangeDecorator)delegate
			  ------.....
			   -----(DefaultServerWebExchange)delegate
  In the current source code, there is no deep search, but only the next level. When there are multiple custom filters, you get an error.

Repair method:

  Look for "delegate" of "ServerWebExchangeDecorator" recursively until "DefaultServerWebExchange"

* spring-boot-webflux traceid does not transmit #3411

spring-boot-starter-webflux-version:2.1.6

Error Description:

Customize the filter, traceid does not transmit.

"ServerWebExchangeDecorator" is a transport chain,His structure should be like this:

 serverWebExchangeDecorator
    -----(ServerWebExchangeDecorator)delegate
	    ------(ServerWebExchangeDecorator)delegate
		  ------.....
		   -----(DefaultServerWebExchange)delegate

In the current source code, there is no deep search, but only the next level. When there are multiple custom filters, you get an error.

Repair method:

Look for "delegate" of "ServerWebExchangeDecorator" recursively until "DefaultServerWebExchange"

* checkStyle
2019-09-10 22:44:36 -07:00
吴晟 Wu Sheng ce20fe107d
Move to 6.5.0 (#3439)
* [maven-release-plugin] prepare release v6.4.0

* [maven-release-plugin] prepare for next development iteration
2019-09-08 16:24:21 -07:00
于玉桔 44556ae006 gateway & webflux compatible with these scene (#3419) 2019-09-05 06:36:22 -07:00
Stalary 05d9c0a93a MOD: Modify compatibility of kafka plugin and expand operationName (#3390)
* ADD: add operationName length threshold

* MOD:move operationName threshold to Config, simplified code

* MOD:update agent set-up document, clean code

* MOD:add agent.operation_name_threshold conf prefix

* MOD: Modify compatibility of kafka plugin and expand operationName

* MOD: Delete localSpan layer, modify consumer operationName, delete producer key

* MOD: Modify operationName, reduce String operation

* FIX: Fix callback break, the new version of kafka callback is intercepted twice and needs to be judged

* FIX: Fix different problems with KafkaProducer constructor in old and new versions

* MOD: separate code
2019-09-03 18:40:33 -07:00
于玉桔 7f5ac239b9 fix bug (#3393) 2019-09-02 21:04:51 +08:00
康智冬 70b825ce43 fix typo (#3388) 2019-09-01 08:35:32 +08:00
qxo 77736c5e7d okhttp OnFailureInterceptor should log exception info (#3381) 2019-08-30 22:39:28 +08:00
kezhenxu94 54614a0594 Support gateway without agent (#3308)
* Support Gateway without agent
2019-08-30 16:17:41 +08:00
wuxingye 57b345ddaa add logstash logback plugin (#3365)
* add logstash logback plugin

* add logstash logback plugin, set pom provided, refine logback doc

* refine logstash logback doc

* refine the comment

* remove the app_id that not related to SkyWalking

* remove tag @date for CI error: unknown tag: date

* add description for iLoggingEvent for ci warning: no description for @param
2019-08-29 22:58:49 +08:00
于玉桔 95ceacfc15 Fix the zookeeper plugin has many nodes in the cluster case (#3372)
* Fix the zookeeper plugin has many nodes in the cluster case

* support version
2019-08-29 19:32:37 +08:00
Andy Ai 8bf7e346ee Support play 2.x (#3207)
* Support play 2.x
2019-08-29 17:00:51 +08:00
Stalary 3d00d83fc6 ADD: add operationName length threshold (#3357)
* ADD: add operationName length threshold

* MOD:move operationName threshold to Config, simplified code

* MOD:update agent set-up document, clean code

* MOD:add agent.operation_name_threshold conf prefix
2019-08-28 22:18:11 +08:00
刘新元 Liu XinYuan ed5a1fc2d2 solve dubbo and service class without method intercept failure (#3362) 2019-08-28 20:10:48 +08:00
吴晟 Wu Sheng a3241f0a59
Support op group name in agent config core. (#3299)
* Support op group name in agent config core.

* Provide core API for operation name grouping, rest template plugin update, and doc update.

* Fix doc

* Fix test case.

* Fix missing changes.

* add shuyun to powered-by.md (#3341)

* add shuyun to powered-by.md

* update powered-by.md

* Remove static method.
2019-08-27 15:07:44 +08:00
evanxuhe 1cc4a517c2 Log4j2 support AsyncRoot print tid. All versions above 2.0 supported (#3284)
* Log4j2 support AsyncRoot print tid
Support AsyncRoot print tid of all versions of log4j2 2.1+
2019-08-26 21:00:46 +08:00
honganan 3c8307fe1f fix 3296 (#3306) 2019-08-24 17:32:39 +08:00
qxo c9acb495ed TraceContextInterceptor:reduce unnecessary call to the origin method TraceContext#traceId() (#3313) 2019-08-23 23:19:02 +08:00
Jared Tan 6d94411482 Add more configuration and explainations. (#3302)
* Add more configuration and explainations.
2019-08-22 21:20:17 +08:00
Alan Lau d3d06a1ed9 Add simple tests for DictionaryUtil. (#3301) 2019-08-22 13:44:26 +08:00
吴晟 Wu Sheng b051f6b094 Log message cached unexpected (#3303) 2019-08-22 11:14:51 +08:00
Alan Lau a71c3abef6 Add cached writer. (#3287)
* Add cached writer so we need not call whole method.

* Make writer volatile.

* Make writer to WRITER.

* Rewrite the writeFactory for add the cached writer and keep the unit tests stable.

* Give the default writer.

* Remove volatile.
2019-08-22 10:03:54 +08:00
kezhenxu94 37f367a3b7 Stabilize unit test (#3291)
* Stabilize unit test

The FileWriterTest creates files in the source directory(failed to
delete them due to a bug in the `deleteDir` method), making
them being checked by checkstyle plugin and failed to pass.

* Seperate compilation step
2019-08-20 15:04:50 +08:00
kezhenxu94 db9759fcc2 Check license header strictly (#3274)
* Check license header strictly

* Ignore header template

* Include more files to check list
2019-08-16 14:37:44 +08:00
吴晟 Wu Sheng 0ae2228a86
Make auto instrumentation works when Module definition existing (#3199)
* Refactor open edge.

* Make refactor works.

* Revert log back.

* Remove unnecessary codes.

* Open edge for all internal binding interceptors.

* Add document about JDK 9+ module.

* Change bytebuddy to 1.10.1(unreleased)

* Change document

* 1. Adopt the latest bytebudy changes(snapshot only), commit b609711564.
2. Remove disruptor by ArrayBlockingQueue, because Disruptor can't work in both JDK 8(1) and 9-12, if we don't add `--add-modules jdk.unsupported`
3. Doc update.

* Update README.md
2019-08-15 07:46:28 +08:00
于玉桔 19b37cab6f Optimize spring cloud gateway in concurrent scenes with asyncSpan api (#3265)
* update gateway
2019-08-14 22:02:52 +08:00
Alvin ffe1df579f Enhance agent logger. (#3250)
* Add pattern logger to replace the easy logger.
* Doc update
* Support console log
2019-08-14 14:31:24 +08:00
yangxb2010000 22018d6a9f fix createExitSpan bug (#3257) 2019-08-14 00:10:51 +08:00
于玉桔 a0e816771c Webflux plugin optimization (#3243)
* webflux
2019-08-13 22:52:01 +08:00
Andy Ai 7eb5694a5f Java agent support undertow routing handler (#3173)
* Support undertow routing handler
2019-08-13 22:30:11 +08:00
Alvin 90d525b164 Improve agent grpc auto reconnect (#3240)
* improve auto connect

* add config

* use int instread of atomic

* update format

* update doc

* update var name and doc

* fix
2019-08-11 12:30:17 +08:00
qxo a328a3bafc jdbc-commons:reduce unnecessary call ThreadLocal with ContextManager#stopSpan(span) (#3244) 2019-08-10 22:46:17 +08:00
于玉桔 8611124b33 Unified http status code usage (#3239)
* Unified http status code usage

* fmt
2019-08-10 18:17:17 +08:00
qxo 1ae04cf2bb improve AsyncSpan API: make #asyncFinish and #prepareForAsync can not invoke more than once (#3201)
* improve AsyncSpan API: make #asyncFinish and #prepareForAsync can not invoke more than once
make the API more strong: make the plugin code bug fail-fast
2019-08-06 08:30:29 +08:00
吴晟 Wu Sheng b247dc979e
Move project master branch to 6.4.0-SNAPSHOT (#3220)
* [maven-release-plugin] prepare release v6.3.0

* [maven-release-plugin] prepare for next development iteration
2019-08-05 21:19:17 +08:00
吴晟 Wu Sheng bb4ce945cf
Add change log for 6.3.0 release. (#3209)
* Add changelog for 6.3.0 release.

* Update CHANGES.md

Co-Authored-By: kezhenxu94 <kezhenxu94@apache.org>

* Update CHANGES.md
2019-08-03 18:46:14 +08:00
Andy Ai 532f430369 Fixed java agent cannot trace gRPC stream service (#3145)
* Fixed java agent cannot trace gRPC stream service
2019-08-03 17:38:39 +08:00
li.can 6e837153f2 Add jdk http plugin (#3171)
* add http

* update plugin

* Add StaticMethodsAroundInterceptor to be injected.

* move to options plugin

* move folder

* update pom

* support https

* add witness class

* Make JDK9-11 available for bootstrap instrumentation

* Remove temp folder of old bootstrap instrumentation requirement.

* remove witness ,work for jdk6,7,8,9,10,11

* Make JDK 12 works.

* move jdk-http-plugin to bootstrap-plugins folder

* add httpsclient

* update README.md
2019-08-03 10:26:20 +08:00
吴晟 Wu Sheng ff0ffb99ca
Add agent version in gRPC connection establish stage (#3205) 2019-08-02 17:07:32 +08:00
kezhenxu94 4db007ee79 Fix wrong time unit (#3203) 2019-08-02 13:53:02 +08:00
kezhenxu94 49f50a24a4 Support upgrade backend w/o rebooting agents (#3170)
* Support upgrade backend w/o rebooting agents
2019-08-02 09:25:17 +08:00
吴晟 Wu Sheng 2b274f3cc0
Make JDK 12 works. (#3197) 2019-07-31 23:24:53 +08:00
吴晟 Wu Sheng b091c0ae48
Make bootstrap instrumentation available in JDK9 - 11 (#3194)
* Make JDK9-11 available for bootstrap instrumentation

* Remove temp folder of old bootstrap instrumentation requirement.
2019-07-31 15:30:11 +08:00
于玉桔 26c6767c36 fix-3155 (#3186) 2019-07-29 14:43:49 +08:00