From 553dd7c0618184a8609d6d964270d52a301aa5f3 Mon Sep 17 00:00:00 2001 From: mrproliu <741550557@qq.com> Date: Fri, 11 Jun 2021 16:59:57 +0800 Subject: [PATCH] Disable spring sleuth analyzer by default (#7106) --- CHANGES.md | 2 +- docs/en/setup/backend/backend-meter.md | 4 ++++ docs/en/setup/backend/backend-receivers.md | 12 ++++++++++++ docs/en/setup/backend/spring-sleuth-setup.md | 8 ++++++++ .../src/main/resources/application.yml | 2 +- 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 1e7c8799e6..56409f0ea2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,7 +11,7 @@ Release Notes. * Supports modifying span attributes in async mode. #### OAP-Backend - +* Disable Spring sleuth meter analyzer by default. #### UI diff --git a/docs/en/setup/backend/backend-meter.md b/docs/en/setup/backend/backend-meter.md index 0cae7d96f2..e94b843bb8 100644 --- a/docs/en/setup/backend/backend-meter.md +++ b/docs/en/setup/backend/backend-meter.md @@ -30,6 +30,10 @@ The file is written in YAML format, defined by the scheme described below. Brack An example can be found [here](../../../../oap-server/server-bootstrap/src/main/resources/meter-analyzer-config/spring-sleuth.yaml). If you're using Spring Sleuth, see [Spring Sleuth Setup](spring-sleuth-setup.md). +| Rule Name | Description | Configuration File | Data Source | +|-----|-----|-----|-----| +|spring-sleuth| Metrics of Spring Sleuth Application | meter-analyzer-config/spring-sleuth.yaml | Sprign Sleuth Application --meter format--> SkyWalking OAP Server | + ### Meters configuration ```yaml diff --git a/docs/en/setup/backend/backend-receivers.md b/docs/en/setup/backend/backend-receivers.md index 82b8d6eebd..42f323acf4 100644 --- a/docs/en/setup/backend/backend-receivers.md +++ b/docs/en/setup/backend/backend-receivers.md @@ -148,6 +148,18 @@ receiver-meter: default: ``` +To activate the meter rule files: +```yaml +agent-analyzer: + selector: ${SW_AGENT_ANALYZER:default} + default: + meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:} # Which files could be meter analyzed, files split by "," +``` + +The receiver adds labels with `key = service` and `key = instance` to the collected data samples, +and values from service and service instance name defined in SkyWalking Agent, +for identification of the metric data. + ## Zipkin receiver The Zipkin receiver makes the OAP server work as an alternative Zipkin server implementation. It supports Zipkin v1/v2 formats through HTTP service. Make sure you use this with `SW_STORAGE=zipkin-elasticsearch7` option to activate Zipkin storage implementation. diff --git a/docs/en/setup/backend/spring-sleuth-setup.md b/docs/en/setup/backend/spring-sleuth-setup.md index 7eb5a5df81..cc2581d047 100644 --- a/docs/en/setup/backend/spring-sleuth-setup.md +++ b/docs/en/setup/backend/spring-sleuth-setup.md @@ -38,6 +38,14 @@ receiver-meter: 2. Configure the meter config file, It already has the [spring sleuth meter config](../../../../oap-server/server-bootstrap/src/main/resources/meter-analyzer-config/spring-sleuth.yaml). If you also has some customized meter at the agent side, please read [meter document](backend-meter.md#meters-configure) to configure meter. + +3. Enable Spring sleuth config in the `applicaiton.yml`. +```yaml +agent-analyzer: + selector: ${SW_AGENT_ANALYZER:default} + default: + meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:spring-sleuth} +``` ## Add UI dashboard diff --git a/oap-server/server-bootstrap/src/main/resources/application.yml b/oap-server/server-bootstrap/src/main/resources/application.yml index f3ac4d1a5e..1bb16ee25a 100755 --- a/oap-server/server-bootstrap/src/main/resources/application.yml +++ b/oap-server/server-bootstrap/src/main/resources/application.yml @@ -256,7 +256,7 @@ agent-analyzer: # Exit spans with the component in the list would not generate the client-side instance relation metrics. noUpstreamRealAddressAgents: ${SW_NO_UPSTREAM_REAL_ADDRESS:6000,9000} slowTraceSegmentThreshold: ${SW_SLOW_TRACE_SEGMENT_THRESHOLD:-1} # Setting this threshold about the latency would make the slow trace segments sampled if they cost more time, even the sampling mechanism activated. The default value is `-1`, which means would not sample slow traces. Unit, millisecond. - meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:spring-sleuth} # Which files could be meter analyzed, files split by "," + meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:} # Which files could be meter analyzed, files split by "," log-analyzer: selector: ${SW_LOG_ANALYZER:default} -- GitLab