Commit Graph

1010 Commits

Author SHA1 Message Date
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