-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into plugin/optionals
- Loading branch information
Showing
8 changed files
with
99 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
# Official OAL script | ||
First, read [OAL introduction](../concepts-and-designs/oal.md). | ||
|
||
Here is the official scrips is the `generated-analysis-x.y.z.jar/official_analysis.oal` file in distribution, | ||
also the [official_analysis.oal](../../../oap-server/generated-analysis/src/main/resources/official_analysis.oal) in source code repository. | ||
Find OAL script at the `/config/official_analysis.oal` of SkyWalking dist, since 6.3. | ||
You could change it(such as adding filter condition, or add new metrics) and reboot the OAP server, then it will affect. | ||
|
||
**Notice**, this file doesn't effect anything in runtime, although included in distribution. | ||
You need to use OAL tool code generator to build the real analysis codes from it. | ||
All generated codes are under `oal` folder in **oap-server/generated-analysis/target/generated-sources**. | ||
All metrics named in this script could be used in alarm and UI query. | ||
|
||
All metrics named in this script could be used in alarm and UI query. Of course, you can change this | ||
scripts and re-generate the analysis process and metrics, such as adding filter condition. | ||
Notice, | ||
|
||
If you try to add or remove some metrics, UI may break, we only recommend you to do this when you plan | ||
to build your own UI based on the customization analysis core. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: "config.istio.io/v1alpha2" | ||
kind: adapter | ||
metadata: | ||
name: swadapter | ||
namespace: istio-system | ||
spec: | ||
description: | ||
session_based: false | ||
templates: | ||
- metric | ||
--- | ||
|
||
apiVersion: "config.istio.io/v1alpha2" | ||
kind: handler | ||
metadata: | ||
name: sw | ||
namespace: istio-system | ||
spec: | ||
adapter: swadapter | ||
connection: | ||
address: "oap.skywalking.svc.cluster.local:11800" | ||
--- | ||
|
||
# instance for template metric | ||
apiVersion: "config.istio.io/v1alpha2" | ||
kind: instance | ||
metadata: | ||
name: swmetric | ||
namespace: istio-system | ||
spec: | ||
template: metric | ||
params: | ||
value: request.size | 0 | ||
dimensions: | ||
sourceService: source.workload.name | "" | ||
sourceNamespace: source.workload.namespace | "" | ||
sourceUID: source.uid | "" | ||
destinationService: destination.workload.name | "" | ||
destinationNamespace: destination.workload.namespace | "" | ||
destinationUID: destination.uid | "" | ||
requestMethod: request.method | "" | ||
requestPath: request.path | "" | ||
requestScheme: request.scheme | "" | ||
requestTime: request.time | ||
responseTime: response.time | ||
responseCode: response.code | 200 | ||
reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") | ||
apiProtocol: api.protocol | "" | ||
--- | ||
|
||
# rule to dispatch to handler sw | ||
apiVersion: "config.istio.io/v1alpha2" | ||
kind: rule | ||
metadata: | ||
name: swmetric-rule | ||
namespace: istio-system | ||
spec: | ||
actions: | ||
- handler: sw.istio-system | ||
instances: | ||
- swmetric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters