Skywalking: [FEATURE] Performance profile at method level in production environment

Created on 22 Dec 2019  Â·  11Comments  Â·  Source: apache/skywalking

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • [ ] Question or discussion
  • [ ] Bug
  • [ ] Requirement
  • [x] Feature or performance improvement

I wrote about the thread monitoring proposal in the mail list.
The doc is now complete to introduce this feature: https://docs.google.com/document/d/1rxMf1WN3PaFaZp7r8JmtwfdkmjLTcFW_ETAZv5FIU-s/edit

Because the amount of development is relatively large, I will divide the following steps into the development work:

Step 1: Save thread monitoring tasks to storage and corresponding graphQL

  1. Define thread monitoring DAO, graphql, mainly including adding task interface
  2. Implementing JDBC storage
  3. Implementing Elasticsearch storage
  4. Implementing Elastic-search 7 storage

Step 2: Downstream task to sniffer

  1. Define the cache interface (CacheDAO), which can be used to query the cached data. Implementing JDBC storage
  2. Complete queries in Elasticsearch and Elasticsearch 7
  3. Create a CacheService and start a scheduled task to write data to the cache
  4. Define the protocol file (query command) for OAP to communicate with the sniffer, and implement the gRPC server handler

Step 3: sniffer executes commands to monitor traces

  1. Start timing tasks for command reading, and define the gRPC protocol (for snapshot upload)
  2. Monitor trace generation and report data
  3. Write Testcase (JUnit) to ensure that snapshots can be created and reported after receiving the command

Step 4: OAP saves thread snapshot

  1. Define the receive module, define the interface for adding snapshots in the DAO, and receive the data save request passed by the sniffer
  2. Implementing JDBC storage
  3. Implementing Elasticsearch storage
  4. Implementing Elastic-search 7 storage
  5. Write Testcase, save operation based on received data

Step 5: Query data and display graphql

  1. Define query interface and graphql for querying task list, related trace list, and snapshot
  2. Implementing JDBC storage
  3. Implementing Elasticsearch storage
  4. Implementing Elastic-search 7 storage
  5. Complete test code (e2e-cluster-test-runner)
UI agent backend core feature

All 11 comments

Branch profile will be created after 6.6.0 release. PRs of all steps should send to there, after all features tested and e2e test setup, I will submit a un-squash merge PR to the master.

This is a very important feature, @apache/skywalking-committers, welcome and look forward all of you could take part in and help on review. Design doc should be ready.

To all in this thread

@mrproliu has made big progress in this feature. We miss the last step, then we could deliver the test env to UI team, @Fine0830.
I have submitted the CFP about this for SRECon and JavaZone, I hope I could at least get one passed.

To all in this thread

@mrproliu has made big progress in this feature. We miss the last step, then we could deliver the test env to UI team, @Fine0830.
I have submitted the CFP about this for SRECon and JavaZone, I hope I could at least get one passed.

hmm...I don't understand what the test env is and what we need to do in UI.

hmm...I don't understand what the test env is and what we need to do in UI.

Test env is the one(by using docker), we will give you to set up locally, then you could easily query .

UI design is included in the Google doc, here are the links

  1. Main page, https://bwd5l7.axshare.com/#id=8sgf47&p=thread-monitor-page&g=1
  2. Add task page, https://bwd5l7.axshare.com/#id=61ddhs&p=add-task-modal&g=1

@Fine0830 The UI design is just a proposal and matched the proposal, for details, after you read, we could talk more.

All backend related PRs have been merged, and e2e tests passed. @mrproliu Next step, let's provide a local test image with data to the UI team(@Fine0830 ). Notice, the TTL should be set as long as possible to avoid the profile data being deleted.

The data is ready for the UI team(@Fine0830 ) to access.

  • By running this command, you can start the OAP server locally, which already contains the data content:
    docker run -d -p 12800:12800 -p 9090:9090 mliu111477/profile-graphql:0.0.5
  • Data query related GraphQL has generated query related statements through postman(exclude create). You can refer to this file. After importing, you can use.

@Fine0830 Above inform should be ready for your local run and test. UI draft is there if you have any issue, please ping me, we could discuss, especially about the UI design.



I will review the UI design draft again tomorrow, and try to finalize with @mrproliu

The UI design has been finished.

  • Add task model:
    add-task-modal
  • Profile main page:
    thread-monitor-page

@Fine0830 This is a backend performance benchmark for analysis button action.

https://cwiki.apache.org/confluence/display/SKYWALKING/Performance+profile+analyze+benchmark

Give the tips The analysis usually takes 2-10s, please wait. when user confirms to do analysis action at the UI.

Hi, @Fine0830. I missed the profiled segment query in GraphQL, now has added.
I create the new docker images, please running this command to run it.
docker run -d -p 12800:12800 -p 9090:9090 mliu111477/profile-graphql:0.0.8

The postman has also added this query:
https://www.getpostman.com/collections/8f84a74da2bb9bb6f118

Was this page helpful?
0 / 5 - 0 ratings