wu-sheng opened a new pull request #5849:
URL: https://github.com/apache/skywalking/pull/5849


   <!--
       ⚠️ Please make sure to read this template first, pull requests that 
doesn't accord with this template
       may be closed without notice.
       Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. 
<framework name>, <issue number>.
       Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
   -->
   
   <!-- ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow 
the checklist 👇 ====
   ### Fix <bug description or the bug issue number or bug issue link>
   - [ ] Add a unit test to verify that the fix works.
   - [ ] Explain briefly about why the bug exists and how to fix it.
        ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow 
the checklist 👆 ==== -->
   
   <!-- ==== 🔌 Remove this line WHEN AND ONLY WHEN you're adding a new plugin, 
follow the checklist 👇 ====
   ### Add an agent plugin to support <framework name>
   - [ ] Add a test case for the new plugin, refer to [the 
doc](https://github.com/apache/skywalking/blob/master/docs/en/guides/Plugin-test.md)
   - [ ] Add a component id in [the 
component-libraries.yml](https://github.com/apache/skywalking/blob/master/oap-server/server-bootstrap/src/main/resources/component-libraries.yml)
   - [ ] Add a logo in [the UI 
repo](https://github.com/apache/skywalking-rocketbot-ui/tree/master/src/views/components/topology/assets)
        ==== 🔌 Remove this line WHEN AND ONLY WHEN you're adding a new plugin, 
follow the checklist 👆 ==== -->
   
   <!-- ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the 
performance, follow the checklist 👇 ====
   ### Improve the performance of <class or module or ...>
   - [ ] Add a benchmark for the improvement, refer to [the existing 
ones](https://github.com/apache/skywalking/blob/master/apm-commons/apm-datacarrier/src/test/java/org/apache/skywalking/apm/commons/datacarrier/LinkedArrayBenchmark.java)
   - [ ] The benchmark result.
   ```text
   <Paste the benchmark results here>
   ```
   - [ ] Links/URLs to the theory proof or discussion articles/blogs. 
<links/URLs here>
        ==== 📈 Remove this line WHEN AND ONLY WHEN you're improving the 
performance, follow the checklist 👆 ==== -->
   
   <!-- ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, 
follow the checklist 👇 ====
   ### <Feature description>
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [ ] Update the documentation to include this new feature.
   - [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
        ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, 
follow the checklist 👆 ==== -->
   
   - [ ] If this pull request closes/resolves/fixes an existing issue, replace 
the issue number. Closes #<issue number>.
   - [x] Update the [`CHANGES` 
log](https://github.com/apache/skywalking/blob/master/CHANGES.md).
   
   The sidecar is a common concept today, as the service mesh has been the 
next-generation infrastructure, no matter in k8s or out. I found we need to 
support this in the mesh telemetry internal format to support defining metrics 
in the mesh case.
   There are 2 major changes in the PR
   1. Nested classes definition is not supported in the previous OAL core, so I 
added them. It should support any nested class.
   2. Support `sideCar.internalErrorCode` in the Service, ServiceInstance, 
Endpoint, ServiceRelation, and ServiceInstanceRelation sources, then you could 
have OAL scripts like this
   
   ```
   service_cpm_sidecar = from(Service.*).filter(sideCar.internalErrorCode != 
"").cpm();
   service_sla_sidecar = from(Service.*).percent(sideCar.internalErrorCode != 
"");
   ```
   
   The current Istio+Envoy mesh telemetry's `sideCar.internalErrorCode` is 
mapping to envoy's v2 ALS definition, 
https://www.envoyproxy.io/docs/envoy/latest/api-v2/data/accesslog/v2/accesslog.proto#data-accesslog-v2-responseflags.
   
   At last, I didn't change anything in the default OAL, all these two features 
are open to the users. If they want to this, they could add new OAL scripts, 
and set up the UI.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to