Commit Graph

1208 Commits

Author SHA1 Message Date
刘威 842b5d927e
Support Apache IoTDB as a storage option (#7766)
Support Apache IoTDB as a storage option, mostly refer to previous InfluxDB storage option.
* The Design of Apache IoTDB Storage Option, https://skywalking.apache.org/blog/2021-11-23-design-of-iotdb-storage-option/
2021-11-27 09:04:23 +08:00
刘威 6529c1d7ae
fix TopologyQuery.loadEndpointRelation bug in InfluxDB storage (#8187) 2021-11-26 23:18:16 +08:00
吴晟 Wu Sheng cef4f6dcac
A polish for comment. (#8178) 2021-11-24 12:56:15 +08:00
xuxiawei 7cf82f318e
Fix incorrect use of ReentrantLock in GRPCExporter (#8177)
fix that an imse (IllegalMonitorStateException) exception will be thrown when finally releasing the lock when an exception occurs in lock() locking
2021-11-24 12:02:20 +08:00
liqiangz 8436135dc9
Add MeterReportService collectBatch method. (#8165) 2021-11-22 22:11:39 +08:00
kezhenxu94 7b2d91a3d7
Remove filter for Istiod monitor to reduce the prerequisites of job name matching (#8162) 2021-11-21 20:04:53 +08:00
kezhenxu94 a2897db471
Fix the so11y latency of persistence execution latency not correct in ElasticSearch storage (#8161)
The ES persistence execution is now asynchronous and the execution
latency only counts the time to insert the requests into the bulk
processor, instead of the time after the requests are flushed into the
storage, this patch fixes that issue.

There is the same issue in prepare latency but that needs more changes
so I'll leave it to another pull request.
2021-11-20 16:51:54 +08:00
kezhenxu94 973fba0805
Add filter mechanism in MAL core and fix some bugs (#8157) 2021-11-19 23:33:35 +08:00
mrproliu b2e8438820
Change `SO11Y` metric `envoy_als_in_count` to calculate the ALS message count. (#8150)
* Change `SO11Y` metric `envoy_als_in_count` to calculate the ALS message count.
2021-11-19 13:03:59 +08:00
吴晟 Wu Sheng f1127a726e
Fix the incorrect place of Long declaration (#8135) 2021-11-16 20:24:57 +08:00
Kirs 4284a57501
Add MicroBench module to make it easier for developers to write JMH Test (#7985) 2021-11-11 12:01:40 +08:00
吴晟 Wu Sheng c0994eefde
Optimize metrics of minute dimensionality persistence, don't save metric of being default value. (#8066)
Optimize metrics of minute dimensionality persistence.
- The value of metrics, which has declaration of the default value and current value equals the default value logically, the whole row wouldn't be pushed into database.
- Add self-observability `metrics_persistence_skipped` metric to measure the number of skipped metrics.
- SLA(percent function), Apdex, AvgLong(MAL mostly) metrics are mostly optimized because of this. Such as a full-failing error(0% successful rate) and unhealthy(apdex=0) are not costing the storage.
- Hour/Day dimensionalities metrics are not changed, as they cover long duration.
- Fix `max` function in OAL doesn't support negative long.
2021-11-04 09:38:18 +08:00
zhyyu 149b359ca6
fix config yaml data type conversion bug (#8035)
Co-authored-by: yuzhongyu <yuzhongyu@cestc.cn>
2021-10-29 21:35:17 +08:00
吴晟 Wu Sheng 50cc044571
Make new TimeBucket in ElasticSearch compatible with old versions. (#8027) 2021-10-28 10:18:01 +08:00
吴晟 Wu Sheng 2ea12934ce
Fix ElasticSearch implementation of `queryMetricsValues` and `readLabeledMetricsValues` doesn't fill default values (#8012)
* Fix ElasticSearch implementation of `queryMetricsValues` and `readLabeledMetricsValues` doesn't fill default values
* Change generated file path.
2021-10-27 08:27:09 +08:00
Kirs f7bcb76784
move the codes in apm-commons into server-library (#8003) 2021-10-26 20:31:36 +08:00
吴晟 Wu Sheng 3aedfcc4a8
Fix TimeBucket missing in H2, MySQL, TiDB and PostgreSQL bug (#8008) 2021-10-26 19:44:00 +08:00
吴晟 Wu Sheng e575701f85
Support JDK 16 and 17. (#8005) 2021-10-26 16:34:24 +08:00
kezhenxu94 a5685cb149
Add a GraphQL query to get OAP version, display OAP version in startup message and error logs (#8004) 2021-10-26 15:05:37 +08:00
吴晟 Wu Sheng a68503b39f
Fix unexpected deleting due to TTL mechanism bug (#8000) 2021-10-25 22:55:42 +08:00
wankai123 d1dcd3f96c
Replace e2e cases to e2e-v2: Kafka: Base, Meter, Log, Profile (#7986)
* Replace e2e cases to e2e-v2: Kafka: Base, Meter, Log, Profile
* Set `SW_KAFKA_FETCHER_ENABLE_NATIVE_PROTO_LOG`, `SW_KAFKA_FETCHER_ENABLE_NATIVE_JSON_LOG` default `true`.
2021-10-22 10:54:49 +08:00
mrproliu 8d24ba2d9f
Add `getProfileTaskLogs` query method implement (#7984) 2021-10-22 08:20:10 +08:00
zhang-wei 929dc0e91f
support search browser service (#7975) 2021-10-21 15:22:43 +08:00
kezhenxu94 ca539e7ddb
Fix setting wrong field when combining `Event`s (#7953) 2021-10-19 07:14:15 +08:00
mrproliu 605ca03884
support negative infinity bucket in meter system (#7930) 2021-10-15 17:47:44 +08:00
吴晟 Wu Sheng fc0d0e1e7b
Message Queue performance and consuming latency monitoring (#7918)
* Support `!= null` in OAL engine.
* Add `Message Queue Consuming Count` metric for MQ consuming service and endpoint.
* Add `Message Queue Avg Consuming Latency` metric for MQ consuming service and endpoint.
* Document with a new menu in the `tracing` catalog is added
2021-10-13 20:20:36 +08:00
吴晟 Wu Sheng 720dc924e4
Refactor the OAL compiler context to improve readability (#7913)
* Refactor the OAL compiler context to improve readability. Usually, this could not be included in the change log, but considering this kind of refactor could cause not-found bugs, Adding this as a hit if we face some related issues in the future.
* Fix wrong generated codes of hashCode and remoteHashCode methods for numeric fields.
2021-10-12 19:04:28 +08:00
吴晟 Wu Sheng 7f7f604bed
Support `(str->long)` and `(str->int)` cast statements in OAL core engine. (#7907)
Enhance OAL engine core
* Fix `funcParamExpression` and `literalExpression` can't be used in the same aggregation function.
* Support cast statement in the OAL core engine.
* Support `(str->long)` and `(long)` for string to long cast statement.
* Support `(str->int)` and `(int)` for string to int cast statement.
* Support Long literal number in the OAL core engine.
* Support literal `string` as parameter of aggregation function.
* Add `attributeExpression` and `attributeExpressionSegment` in the OAL grammar tree to support `map` type for the
  attribute expression.

Besides added UTs, I locally tested these OAL scripts
```
mq_consume_latency = from((str->long)Service.tag["transmission.latency"]).longAvg();

mq_consume_latency = from((long)Service.tag["transmission.latency"]).longAvg();

mq_consume_latency = from((str->long)Service.tag["transmission.latency"]).filter((str->long)tag["transmission.latency"] > 0L).longAvg();
```
2021-10-12 14:33:23 +08:00
royal-dargon d96192810e
add:add the component-libraries about golang (#7906) 2021-10-12 00:32:31 +08:00
吴晟 Wu Sheng 9d8a774b6a
Enhance `get` generation mechanism of OAL engine, support map type of source's field. (#7904) 2021-10-11 21:04:06 +08:00
xu1009 6452e0c2d9
add kylin plugin component id (#7888) 2021-10-11 12:10:14 +08:00
吴晟 Wu Sheng 8351961315
Remove component definitions in Java codes. (#7893)
* Remove component definitions in Java codes. component-libraries.yml controls the ownership now.

* Remove useless codes.
2021-10-11 00:37:03 +08:00
wallezhang 615bac817e
feat: Add ClickHouse ID in component-libraries.yml (#7865) 2021-10-09 12:26:14 +08:00
kezhenxu94 508945f552
Upgrade Armeria to 1.12, upgrade OpenSearch test version to 1.1.0 (#7866) 2021-10-08 19:45:33 +08:00
kezhenxu94 da9b79ca30
Fix zipkin receiver is not packaged into dist (#7843) 2021-09-30 13:51:51 +08:00
业余布道师 3517cf245a
Add component definition for Jackson. (#7813) 2021-09-29 22:16:58 +08:00
吴晟 Wu Sheng 55de557acf
Revert mis-change, which makes the endpoint dependency breaking. (#7829)
* Revert mis-change, which makes the endpoint dependency breaking.

* Update change log.
2021-09-29 09:06:29 +08:00
kezhenxu94 a4c68d30d8
test: fix that E2E is not run, also add ElasticSearch 7.15 to test matrix (#7826) 2021-09-28 21:57:19 +08:00
Jared Tan c53ee801e7
Remove unused defines (#7807) 2021-09-26 21:41:01 +08:00
吴晟 Wu Sheng 8b681053df
Begin 8.9.0 iteration (#7801)
* [maven-release-plugin] prepare release v8.8.0

* [maven-release-plugin] prepare for next development iteration

* Create changes-8.8.0.md

* Reset changelog for 8.9.0
2021-09-25 23:46:18 +08:00
kezhenxu94 ad9d616297
Add `socketTimeout` back to the new implementation (#7798) 2021-09-24 22:35:56 +08:00
吴晟 Wu Sheng b7ba282a58
Fix entity naming mechanism failure in MAL (#7790) 2021-09-24 19:34:56 +08:00
业余布道师 ba5aa685c7
Add component definition for Fastjson. (#7788) 2021-09-24 13:48:44 +08:00
吴晟 Wu Sheng 8f9a19213c
Fix `Hour`/`Day` dimensionality metrics and `Slow SQL sampling` are not accurate (#7787) 2021-09-24 13:32:30 +08:00
吴晟 Wu Sheng c4b8c66174
Only report `bug warning` in precise conditions. (#7772)
* Only report `bug warning` in precise conditions.

* Add a test check for template existing.
2021-09-23 10:46:08 +08:00
业余布道师 1730f2c84b
add component definition for HikariCP. (#7755) 2021-09-20 13:22:57 +08:00
业余布道师 a19dbe3edb
Add component definition for `Alibaba Druid` (#7736) 2021-09-19 22:52:59 +08:00
wankai123 fc7db29b2e
Support dynamic configurations for openAPI endpoint name grouping rule (#7746) 2021-09-18 12:02:35 +08:00
kezhenxu94 ad842013f4
Replace `mget` with ids' query as `mget` doesn't apply on aliases (#7731) 2021-09-17 17:54:26 +08:00
kezhenxu94 718d06409c
Fix wrong service name when IP is node IP in `k8s-mesh` (#7737) 2021-09-17 17:02:05 +08:00
nicolchen 224b6c6b3a
Improve the speed of writing TiDB by batching the SQL execution (#7691) 2021-09-17 00:05:18 +08:00
CoderGang 92f0ebf126
Fixed bug #7706. Make LogHandler of kafka-fetcher-plugin can recognize namespace. (#7717) 2021-09-16 00:56:55 +08:00
刘威 08990c9069
Fix H2EventQueryDAO doesn't sort data by Event.START_TIME and uses a wrong pagination query (#7720)
* Fix H2EventQueryDAO doesn't sort data by Event.START_TIME.

* Fix H2EventQueryDAO uses a wrong pagination query.
2021-09-15 19:58:41 +08:00
kezhenxu94 73b6c67344
Fix ser/deserializers of ES 6/7-7.8/7.8+, search query, aggregation, order, terms 2021-09-15 17:49:41 +08:00
kezhenxu94 3716219699
Fix that `Query` cannot be updated after it's set in `Search` (#7710) 2021-09-14 18:36:05 +08:00
wankai123 7560c990cf
Support gRPC sync grouped dynamic configurations. (#7709) 2021-09-14 17:06:18 +08:00
kezhenxu94 b20f121e64
Fix that `sortMetrics` should only return `long` not `double` (#7698) 2021-09-12 12:31:42 +08:00
刘威 d06cb76eae
Fix ProfileThreadSnapshotQuery.queryProfiledSegments adopts a wrong sort function (#7696) 2021-09-11 22:55:56 +08:00
wankai123 80f999f998
Support apollo grouped dynamic configurations (#7685) 2021-09-10 14:33:08 +08:00
kezhenxu94 f61dff9a9f
Merge `Dockerfile`s in apache/skywalking-docker into this codebase (#7681) 2021-09-09 12:37:50 +08:00
wankai123 4a344b01e9
Unified the config word `namespace` in the project (#7676) 2021-09-08 12:00:19 +08:00
wankai123 e89493b247
Support etcd grouped dynamic configurations. (#7672) 2021-09-07 22:54:05 +08:00
kezhenxu94 ec03cca31b
Bump up commons-compress version and polish LAL debug error message (#7668) 2021-09-07 12:18:25 +08:00
kezhenxu94 327d946978
Remove docker-maven-plugin in favor of testcontainers (#7664) 2021-09-06 21:04:14 +08:00
kezhenxu94 26b81a2e59
Rebuilt ElasticSearch client on top of their REST API (#7634) 2021-09-06 15:21:35 +08:00
刘威 de59bf7aeb
Fix `H2MetadataQueryDAO.searchService` doesn't support auto grouping. [issue #7653] (#7654) 2021-09-05 13:56:00 +08:00
wankai123 0fae36ed4c
Support consul grouped dynamic configurations (#7647) 2021-09-03 20:52:22 +08:00
honganan e5a5e05f99
add suffix limit to avoid possible start problems (#7641) 2021-09-03 12:44:55 +08:00
Daming 0b67d29996
Support mTLS for gRPC channel (#7565) 2021-09-03 09:17:16 +08:00
YczYanchengzhe a3317a8238
Support for filter filtering of int type values (#7636) 2021-09-02 23:53:05 +08:00
wankai123 5c2418ee9d
Support nacos grouped dynamic configurations. (#7632) 2021-09-01 21:22:06 +08:00
wankai123 313edd3097
Fix `ZookeeperConfigWatcherRegister.readConfig()` could cause `NPE` when `data.getData()` is null (#7611) 2021-08-31 08:39:28 +08:00
wankai123 eb7fae2ef2
Fix dynamic configuration watch implementation current value not null when the config is deleted. (#7606)
* Fix dynamic configuration watch implementation current value not null when the config is deleted.

* add changes.md

* fix LoggingConfigWatcher watch.vale, and when value = null ,config not reset.

* fix

* fix style

* Update oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/UninstrumentedGatewaysConfig.java

Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>

* use Strings.nullToEmpty

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
2021-08-30 18:20:25 +08:00
HendSame 1c0fc982b2
Support configure sampling rate dynamically for service dimension on the backend side (#7554) 2021-08-30 14:52:20 +08:00
刘威 50688c1879
Fix issue#7527, add desc sort function in IBrowserLogQueryDAO of H2 and ES (#7580) 2021-08-26 22:36:24 +08:00
kezhenxu94 af325b6674
Escape `.` in `String.replaceFirst` as it acts as a wildcard (#7576) 2021-08-26 17:06:02 +08:00
wankai123 be0f57ae28
Support k8s configmap grouped dynamic configurations (#7570)
* Support k8s configmap grouped dynamic configurations

* Support single config read from multiple configmaps
2021-08-26 15:30:11 +08:00
wankai123 abcd87f811
Support collection type in dynamic configuration core and add zookeeper implementation (#7509)
* Support grouped dynamic configurations in DCS.
Support zookeeper grouped dynamic configurations.

* change to @Slf4j

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
2021-08-23 18:09:33 +08:00
kezhenxu94 7b206458fe
Fix NPE when OAP nodes synchronize events with each other in cluster mode (#7531) 2021-08-23 13:18:21 +08:00
kezhenxu94 ad0042f6f5
Add missing property set for new field `httpResponseStatusCode` (#7486)
Follow up https://github.com/apache/skywalking/pull/7271
2021-08-19 06:12:05 +08:00
吴晟 Wu Sheng c04b4e0e51
Fix distinct in Service/Instance/Endpoint query is not working. (#7482) 2021-08-18 20:30:15 +08:00
kezhenxu94 09cc0f96a7
Harden the security of Groovy-based DSL, MAL and LAL (#7485) 2021-08-18 18:17:43 +08:00
kezhenxu94 1af2e46e33
Add a new API to test log analysis language (#7475) 2021-08-18 16:40:25 +08:00
CharliePu 39d23c1678
Remove the duplicated tags to reduce the storage payload. (#7469) 2021-08-17 18:01:56 +08:00
wallezhang 4b66f1e0a7
fix: Fix MultiScopesAnalysisListener#setPublicAttrs log warn frequently (#7271)
* fix: Fix MultiScopesAnalysisListener#setPublicAttrs log warn frequently. #6562

1. Rename current STATUS_CODE to HTTP_RESPONSE_STATUS_CODE, real tag key should be http.status_code.
2. Add a new string tag RPC_RESPONSE_STATUS_CODE to hold all string type value tag. The key is `rpc.status_code`.
3. At the backend, keep responseCode for HTTP_RESPONSE_STATUS_CODE tag, but add @Deprecated. Also, add httpResponseStatusCode(a duplicate of responseCode) and rpcStatusCode(for RPC_RESPONSE_STATUS_CODE) fields for OAL.

* Modify `Tags.STATUS_CODE` field name to `Tags.HTTP_RESPONSE_STATUS_CODE` and type from `StringTag` to `IntegerTag`, add `Tags.RPC_RESPONSE_STATUS_CODE` field to hold rpc response code value.

* Add `rpcStatusCode` for `rpc.status_code` tag in the OAL objects. The `responseCode` field is marked as deprecated and replaced by `httpResponseStatusCode` field. 

* Tag `status_code` is still supported in the backend for forward compatbility. Will be removed one year later.

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
2021-08-14 20:17:46 +08:00
吴晟 Wu Sheng dc05539361
DataCarrier changes a `#consume` API to add properties as a parameter to initialize consumer (#7452) 2021-08-13 14:05:10 +08:00
probeyang 35dd15bfbf
Add component id and icon for Python falcon plugin (#7446) 2021-08-12 12:17:01 +08:00
吴晟 Wu Sheng 6a241aed75
[Break Change] Remove endpoint name in backend log and browser log query (#7444)
* Remove page path in the browser log query condition.

* Remove endpoint name in the backend log query condition.
2021-08-12 09:44:19 +08:00
吴晟 Wu Sheng de6cae3429
[Break Change] Remove endpoint name in the trace query condition. (#7438)
* [Break Change] Remove endpoint name in the trace query condition.

* Fix a local UT error(MacOS only)
2021-08-11 16:27:10 +08:00
kezhenxu94 139bb56ac9
Fix missing Kratos component id (#7435) 2021-08-11 13:20:32 +08:00
Kagaya 9a05ad4b42
Add component id for go-kratos & go-mysql (#7428) 2021-08-10 15:42:20 +08:00
kezhenxu94 85e22f5124
Fix issues in ES7.14 and add log cases to ES7.14 (#7429) 2021-08-10 15:36:53 +08:00
吴晟 Wu Sheng cc66254729
Remove statement, version, and endtime from segment entity. (#7427) 2021-08-10 00:05:06 +08:00
Halil Onur Çeçen bca62f63fa
Openapi-definitions file loader fix (#7417)
* excluded openapi-definitions resource folder

jar class loader comes before runtime config folder

* update CHANGES.md

* include openapi-definitions folder in bin packages.

Co-authored-by: Halil Onur Cecen <HalilOnur.Cecen@sahibinden.com>
2021-08-07 09:53:48 +08:00
wankai123 4e7d80fb88
Support Metric level function `serviceRelation` in `MAL` and binding envoy metrics into the topology. (#7399)
* Support Metric level function `serviceRelation` in `MAL`.
* Support envoy metrics binding into the topology.
* add istio args
* remove istio 1.7

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
Co-authored-by: Jared Tan <jian.tan@daocloud.io>
Co-authored-by: Zhenxu <kezhenxu94@apache.org>
2021-08-06 17:09:13 +08:00
Daming 9ecb9fd87c
add event http receiver (#7406) 2021-08-04 15:53:48 +08:00
吴晟 Wu Sheng 1c5e22a7be
Begin 8.8.0 iteration (#7395)
* [maven-release-plugin] prepare release v8.7.0

* [maven-release-plugin] prepare for next development iteration
2021-07-30 23:01:09 +08:00
Gao Hongtao 1f28d2036a
Add logging module to load log configuration dynamically (#7377)
* Add logging module to load log configuration dynamically

Signed-off-by: Gao Hongtao <hanahmily@gmail.com>
2021-07-29 19:55:22 +08:00
kezhenxu94 65e8ab3ecc
Log rate limit sampler rename `qps` to `rpm` (#7384) 2021-07-29 18:11:07 +08:00
pkxiuluo ffc69dc6f3
ES storage support set order of index template. (#7378) 2021-07-27 20:13:31 +08:00
LEE ea76335527
Avoid "select *" query (#7372) 2021-07-27 15:50:55 +08:00
Switch 68e699550d
Add Thread and ClassLoader Metrics for the self-observability and otel-oc-rules (#7367)
* Add Thread and ClassLoader Metrics for the self-observability

* update CHANGES.md

* update OC receiver MAL settings
2021-07-25 07:32:03 +08:00
Ax1an 383e32b44b
Fix the persistent session timeout mechanism bug. (#7347) 2021-07-22 05:50:19 +08:00
Huang bf0e22d2c1
Fix IllegalArgumentException in PrometheusMetricConverter and NaN value samples in SampleFamily (#7349) 2021-07-21 23:14:49 +08:00
Ax1an 3704567b21
Fix possible version_conflict_engine_exception in bulk execution. (#7354) 2021-07-21 20:48:52 +08:00
吴晟 Wu Sheng bd23f263e6
Revert "Adjust the project structure of the alarm module" (#7342)
This reverts commit 62411964a4.
2021-07-20 19:47:22 +08:00
Jared Tan 62411964a4
update (#7340) 2021-07-20 16:27:26 +08:00
Cool-Coding 7654161721
Fix the problem of Kafka transport topics are created duplicated with and without namespace (#7326) (#7329) 2021-07-20 08:50:36 +08:00
吴晟 Wu Sheng 3a4ee08e54
Enhance persistent session timeout mechanism. (#7334)
Fix bug, the enhanced session could cache the metadata metrics(hot entity) forever. A new timeout mechanism is designed for avoiding this specific case.

Optimize this timeout mechanism, make it different for ES(one index per day) and non-ES storage implementation.
2021-07-20 07:50:27 +08:00
Cool-Coding 467a95b61d
Fix the problem of -meters metrics topic isn't created with namespace prefix (#7325) (#7330) 2021-07-19 14:58:24 +08:00
吴晟 Wu Sheng a6afcac86e
Logically revert #6642 and partial #7153 to reduce unnecessary thread and concurrency process (#7318)
The key logic behinds all these is, metrics persistence is fully asynchronous.

* The core/maxSyncOperationNum setting(added in 8.5.0) is removed due to metrics persistence is fully asynchronous.
* The core/syncThreads setting(added in 8.5.0) is removed due to metrics persistence is fully asynchronous.
* Optimization: Concurrency mode of execution stage for metrics is removed(added in 8.5.0). The only concurrency of prepare stage is meaningful and kept.
* Remove the outside preparedRequest list initialization, worker instance could always build a suitable size list in the first place (Reduce Array.copy and GC load a little).
2021-07-17 16:03:50 +08:00
wankai123 9f3ff517d1
Support envoy cluster manager metrics (#7294) 2021-07-16 15:35:48 +08:00
吴晟 Wu Sheng 8df362b929
Adjust ElasticSearch index refresh period as INT(flushInterval * 2/3) (#7310)
Adjust index refresh period as INT(flushInterval * 2/3), it used to be as same as bulk flush period. At the edge case, in low traffic(traffic < bulkActions in the whole period), there is a possible case, 2 period bulks are included in one index refresh rebuild operation, which could cause version conflicts. And this case can't be fixed through core/persistentPeriod as the bulk fresh is not controlled by the persistent timer anymore.

This PR should avoid the following exception in the low load case, especially when bulkActions is set larger than the number of a metric type.
2021-07-16 12:10:35 +08:00
吴晟 Wu Sheng 408bbf86e6
Fix a misused variable. (#7309) 2021-07-15 19:31:50 +08:00
吴晟 Wu Sheng c59ee90029
Performance: optimize IDs read of ElasticSearch storage options(6 and 7) (#7307)
* Performance: optimize IDs read of ElasticSearch storage options(6 and 7). Use the physical index rather than template alias name.
2021-07-15 18:06:11 +08:00
吴晟 Wu Sheng 097a8b7231
Reduce the flush period of hour and day level metrics (#7299) 2021-07-15 07:36:12 +08:00
吴晟 Wu Sheng de975c7e2b
Remove synchronous persistence mechanism in API level and ElasticSearch implementation (#7293)
* Performance: remove the synchronous persistence mechanism from batch ElasticSearch DAO. Because the current enhanced persistent session mechanism, don't require the data queryable immediately after the insert and update anymore.
* Performance: share `flushInterval` setting for both metrics and record data, due to `synchronous persistence mechanism` removed. Record flush interval used to be hardcoded as 10s.
* Remove `syncBulkActions` in ElasticSearch storage option.
* Increase the default bulkActions(env, SW_STORAGE_ES_BULK_ACTIONS) to 5000(from 1000).
* Increase the flush interval of ElasticSearch indices to 15s(from 10s)

Add these 2 references. According to these, **(same _index, _type and _id) in same bulk will be in order**
1. https://github.com/elastic/elasticsearch/issues/50199
2. https://discuss.elastic.co/t/order-of--bulk-request-operations/98124

Notice, the order of different bulks is not guaranteed by the ElasticSearch cluster. We are going to have the risk of dirty write. But consider we set over 20s period between flush, and index flush period is 10, we should be safe.

Recommend 5000 bulk size and 15s flush interval only. The persistent period has been set to 25s.
2021-07-14 17:19:49 +08:00
kezhenxu94 982001c63a
perf: optimize Envoy access log persistence performance (#7290) 2021-07-13 18:44:52 +08:00
kezhenxu94 b5eb1572eb
chore: clean up source-dependencies' licenses (#7277) 2021-07-10 11:55:20 +08:00
kezhenxu94 d79094c178
Add pagination to event query (#7274) 2021-07-09 23:04:50 +08:00
kezhenxu94 fd92f4678a
perf: optimize Groovy-based LAL DSL with static compilation (#7263)
Groovy naturally supports many dynamic features that we don't benefit for now but cost performance loss, in this patch we compile our Groovy-based DSL scripts statically to optimize performance.
2021-07-09 18:00:25 +08:00
whl12345 9e022d1a73
Provide plugin for Guava Cache (#7235) 2021-07-08 11:58:09 +08:00
Switch 4067fba2ab
Add some new thread metric and class metric to JVMMetric (#7230) (#7243) 2021-07-07 16:30:55 +08:00
Sergi Castro d15b67bd97
Allow configuring max request header size (#7249)
* Allow configuring max request header size

This allows configuring the HTTP max request header size from the jetty
server.
By default it uses 8192, the same jetty default.
2021-07-06 15:10:15 +08:00
Daming 5dd56a5ca4
Upgrade etcd cluster coordinator and dynamic configuration to v3.x (#7215) 2021-07-05 11:23:11 +08:00
Daming 022bf38116
Fix InfluxDB storage-plugin Metrics#multiGet issue (#7238) 2021-07-03 13:58:27 +08:00
liqiangz 0f62d9289f
Add agent plugin to support Sentinel (#7190) 2021-07-03 00:20:14 +08:00
吴晟 Wu Sheng f32d3d0720
Enhance the storage session mechanism (#7221) 2021-07-01 23:25:52 +08:00
吴晟 Wu Sheng 536b7d2328
Support connectTimeout and socketTimeout settings (#7214) 2021-07-01 08:20:59 +08:00
吴晟 Wu Sheng 50a0bcbf73
Optimize L1 aggregation, enhance gRPC client between L1 and L2 aggregation. (#7206)
1.0Performance: Add L1 aggregation flush period, which reduces the CPU load and helps young GC.

2. Replace do not direct send after the first aggregation to reduce the network #6400.

3. Enhance the DataCarrier to notify the consumer in no enqueue event in short term.

4. L1 aggregation flush period still works even no further metrics generated, powered by <3>

5. Fix gRPC remote client OOM. The concurrency control mechanism failed.
2021-06-30 19:14:20 +08:00
吴晟 Wu Sheng 89549c0183
Fix the queue initial size is not set by max batch size accordingly (#7204) 2021-06-30 11:33:07 +08:00
吴晟 Wu Sheng 16ebaade6a
Optimize IDs reading in the persistent worker. (#7193)
* Optimize IDs reading in the persistent worker.
2021-06-30 10:17:46 +08:00
kezhenxu94 f5b7c3e32d
Perf: cache metrics id and entity id (#7201)
There are a lot of calls to `Metrics.id()` and `ISource.getEntityId`, which calculates the id by manipulating strings in every single call, producing many garbage objects.

In this patch, I cache the id and only calculate the id if it's requested for the first time.
2021-06-29 22:48:51 +08:00
kezhenxu94 84a7fe30c8
Perf: cache regex pattern and result, optimize string concatenation (#7199)
The possible metrics names are relatively fixed in an OAP run, we previously always escape the metrics names, building a new regex Pattern from scratch, which is cpu-consuming.

In this patch, I cache the escaped metrics names, and if it missed, use a pre-compiled regex Pattern to escape the metrics name.

This patch also replace string concatenation `+` with `StringBuilder` in generated classes, which won't get optimized by Java compiler

This may reduce 1~1.5 vCPU under 20K RPS environment.
2021-06-29 17:46:42 +08:00
zhyyu b8fadec033
fix slow db dynamic config bug (#7192) 2021-06-29 16:41:01 +08:00
Alvin a966eea35c
Support prepare and save metrics concurrency (#7153) 2021-06-29 14:34:29 +08:00
kezhenxu94 de1d0461cc
perf: trim useless metadata fields in ALS to improve performance (#7191)
These fields in `stateMap` metadata are not used by `metadata-service-mapping.yaml` now and there is low possibility that they may be used in real case, but, they cost a lot to deserialize, so we remove them to improve performance

From what I've tested, the analyzer can process 250k ALS logs before trimming the fields and can process 420k ALS logs after trimming the fields
2021-06-28 22:18:14 +08:00
liqiangz d63f3ffcc1
revert #7091 (#7189) 2021-06-28 21:05:28 +08:00
kezhenxu94 e7bc81abbb
Perf: optimize Envoy ALS analyzer performance in high traffic load scenario (reduce ~1cpu in ~10k RPS) (#7182) 2021-06-27 17:56:59 +08:00
wankai123 e95064d976
chore: set openAPI grouping CoreModuleConfig default value consistent with application.yaml, add re-benchmark result (#7176) 2021-06-26 00:08:14 +08:00
Daming d8a5e8c15b
eliminate `now` error at a fixed rate schedule executor (#7145) 2021-06-24 09:24:48 +08:00
Tomasz Pytel 8a25ac6229
Python celery plugin (#7159) 2021-06-22 22:05:33 +08:00
wallezhang 1bc69370bf
feat: add neo4j-4.x-plugin (#7099) 2021-06-22 15:36:51 +08:00
kezhenxu94 3536b3c1c4
Extract dependency management to a bom (#7136) 2021-06-20 20:57:26 +08:00
wankai123 19a068d708
Feature: support endpoint name grouping by OpenAPI definitions. (#7130) 2021-06-20 07:57:10 +08:00
kezhenxu94 528ee6de40
OAL supports generating metrics from events (#7134)
* OAL supports generating metrics from events

* Add new dashboard for event metrics

* Add some docs for event metrics
2021-06-19 20:20:37 +08:00
kezhenxu94 edf6fccf9c
Upgrade commons-lang3 to avoid potential NPE in some JDK versions (#7133) 2021-06-18 21:18:05 +08:00
Ax1an 402902f75c
Agent supports the collection of JVM arguments and jar dependencies information. (#7069) 2021-06-17 15:30:44 +08:00
Tomasz Pytel 76b3bece2b
add component id for python Psycopg -> PostgreSQL (#7125) 2021-06-17 06:30:52 +08:00
Gao Hongtao 669fe1593c
Upgrade OAP dependencies (#7119)
* Introduce trivy to scan images

Signed-off-by: Gao Hongtao <hanahmily@gmail.com>

* Fix CVE

Signed-off-by: Gao Hongtao <hanahmily@gmail.com>

* Update licenses

Signed-off-by: Gao Hongtao <hanahmily@gmail.com>

* Remove log4j 1.x

Signed-off-by: Gao Hongtao <hanahmily@gmail.com>

* Update CHANGES.md

Signed-off-by: Gao Hongtao <hanahmily@gmail.com>

* Update LICENSE refer to webapp

Signed-off-by: Gao Hongtao <hanahmily@gmail.com>

Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
2021-06-16 12:14:39 +08:00