-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SkyWalking Java Agent self observability dashboard #12622
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f2f22e5
Add SkyWalking Java Agent self observability dashboard.
CzyerChen 1a219fc
update metric: meter_java_agent_tracing_context_execution_time_percen…
CzyerChen bce7fb8
add e2e testcase, sync ui, add tips.
CzyerChen 22de0d6
update e2e testcase.
CzyerChen 8ed0aa6
update cases and dashboard tips.
CzyerChen 74b74c7
update kafka case.
CzyerChen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Java Agent self observability dashboard | ||
|
||
SkyWalking java agent reports itself metrics by Meter APIS in order to measure tracing performance. | ||
it also provides a dashboard to visualize the agent metrics. | ||
|
||
## Data flow | ||
1. SkyWalking java agent reports metrics data internally and automatically. | ||
2. SkyWalking OAP accept these meters through native protocols. | ||
3. The SkyWalking OAP Server parses the expression with [MAL](../../concepts-and-designs/mal.md) to filter/calculate/aggregate and store the results. | ||
|
||
## Set up | ||
Java Agent so11y is a build-in feature, it reports meters automatically after boot. | ||
|
||
## Self observability monitoring | ||
Self observability monitoring provides monitoring of the runtime performance of the java agent itself. `agent.service_name` is a `Service` in Agent so11y, and land on the `Layer: SO11Y_JAVA_AGENT`. | ||
|
||
### Self observability metrics | ||
|
||
| Unit | Metric Name | Description | Data Source | | ||
|-------------------|----------------------------------------------------------------|---------------------------------------------|-----------------------| | ||
| Count Per Minute | meter_java_agent_created_tracing_context_count | Created Tracing Context Count (Per Minute) | SkyWalking Java Agent | | ||
| Count Per Minute | meter_java_agent_finished_tracing_context_count | Finished Tracing Context Count (Per Minute) | SkyWalking Java Agent | | ||
| Count Per Minute | meter_java_agent_created_ignored_context_count | Created Ignored Context Count (Per Minute) | SkyWalking Java Agent | | ||
| Count Per Minute | meter_java_agent_finished_ignored_context_count | Finished Ignored Context Count (Per Minute) | SkyWalking Java Agent | | ||
| Count Per Minute | meter_java_agent_possible_leaked_context_count | Possible Leak Context Count (Per Minute) | SkyWalking Java Agent | | ||
| Count Per Minute | meter_java_agent_interceptor_error_count | Interceptor Error Count (Per Minute) | SkyWalking Java Agent | | ||
| ns | meter_java_agent_tracing_context_execution_time_percentile | Tracing Context Execution Time (ns) | SkyWalking Java Agent | | ||
|
||
## Customizations | ||
You can customize your own metrics/expression/dashboard panel. | ||
The metrics definition and expression rules are found in `/meter-analyzer-config/java-agent.yaml` | ||
The self observability dashboard panel configurations are found in `/config/ui-initialized-templates/so11y_java_agent`. |
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
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
32 changes: 32 additions & 0 deletions
32
oap-server/server-starter/src/main/resources/meter-analyzer-config/java-agent.yaml
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,32 @@ | ||
# 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. | ||
|
||
expSuffix: instance(['service'], ['instance'], Layer.SO11Y_JAVA_AGENT) | ||
metricPrefix: meter_java_agent | ||
metricsRules: | ||
- name: created_tracing_context_count | ||
exp: created_tracing_context_counter.sum(['created_by', 'service', 'instance']).increase('PT1M') | ||
- name: finished_tracing_context_count | ||
exp: finished_tracing_context_counter.sum(['service', 'instance']).increase('PT1M') | ||
- name: created_ignored_context_count | ||
exp: created_ignored_context_counter.sum(['created_by', 'service', 'instance']).increase('PT1M') | ||
- name: finished_ignored_context_count | ||
exp: finished_ignored_context_counter.sum(['service', 'instance']).increase('PT1M') | ||
- name: possible_leaked_context_count | ||
exp: possible_leaked_context_counter.sum(['source', 'service', 'instance']).increase('PT1M') | ||
- name: interceptor_error_count | ||
exp: interceptor_error_counter.sum(['plugin_name', 'inter_type', 'service', 'instance']).increase('PT1M') | ||
- name: tracing_context_execution_time_percentile | ||
exp: tracing_context_performance.sum(['le', 'service', 'instance']).histogram().histogram_percentile([50,70,90,99]) |
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
202 changes: 202 additions & 0 deletions
202
...-starter/src/main/resources/ui-initialized-templates/so11y_java_agent/so11y-instance.json
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,202 @@ | ||
[ | ||
{ | ||
"id": "Self-Observability-Java-Agent-Instance", | ||
"configuration": { | ||
"children": [ | ||
{ | ||
"x": 0, | ||
"y": 0, | ||
"w": 6, | ||
"h": 13, | ||
"i": "14", | ||
"type": "Widget", | ||
"widget": { | ||
"title": "Tracing Context Creation (Per Minute)", | ||
"tips": "The number of created tracing contexts per minute, including a label created_by(value=sampler,propagated)." | ||
}, | ||
"graph": { | ||
"type": "Line", | ||
"step": false, | ||
"smooth": false, | ||
"showSymbol": true, | ||
"showXAxis": true, | ||
"showYAxis": true | ||
}, | ||
"expressions": [ | ||
"meter_java_agent_created_tracing_context_count" | ||
] | ||
}, | ||
{ | ||
"x": 6, | ||
"y": 0, | ||
"w": 6, | ||
"h": 13, | ||
"i": "6", | ||
"type": "Widget", | ||
"widget": { | ||
"title": "Tracing Context Creation and Completion (Per Minute)", | ||
"tips": "The number of created tracing contexts and finished tracing contexts per minute." | ||
}, | ||
"graph": { | ||
"type": "Line", | ||
"step": false, | ||
"smooth": false, | ||
"showSymbol": true, | ||
"showXAxis": true, | ||
"showYAxis": true | ||
}, | ||
"metricConfig": [ | ||
{ | ||
"label": "Creation" | ||
}, | ||
{ | ||
"label": "Completion" | ||
} | ||
], | ||
"expressions": [ | ||
"aggregate_labels(meter_java_agent_created_tracing_context_count,sum)", | ||
"meter_java_agent_finished_tracing_context_count" | ||
] | ||
}, | ||
{ | ||
"x": 12, | ||
"y": 0, | ||
"w": 6, | ||
"h": 13, | ||
"i": "1", | ||
"type": "Widget", | ||
"widget": { | ||
"title": "Ignored Context Creation (Per Minute)", | ||
"tips": "The number of created ignored contexts per minute, including a label created_by(value=sampler,propagated)." | ||
}, | ||
"graph": { | ||
"type": "Line", | ||
"step": false, | ||
"smooth": false, | ||
"showSymbol": true, | ||
"showXAxis": true, | ||
"showYAxis": true | ||
}, | ||
"expressions": [ | ||
"meter_java_agent_created_ignored_context_count" | ||
] | ||
}, | ||
{ | ||
"x": 18, | ||
"y": 0, | ||
"w": 6, | ||
"h": 13, | ||
"i": "2", | ||
"type": "Widget", | ||
"widget": { | ||
"title": "Ignored Context Creation and Completion (Per Minute)", | ||
"tips": "The number of created ignored contexts and finished ignored contexts per minute." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is not always |
||
}, | ||
"graph": { | ||
"type": "Line", | ||
"step": false, | ||
"smooth": false, | ||
"showSymbol": true, | ||
"showXAxis": true, | ||
"showYAxis": true | ||
}, | ||
"expressions": [ | ||
"aggregate_labels(meter_java_agent_created_ignored_context_count,sum)", | ||
"meter_java_agent_finished_ignored_context_count" | ||
], | ||
"metricConfig": [ | ||
{ | ||
"label": "Creation" | ||
}, | ||
{ | ||
"label": "Completion" | ||
} | ||
] | ||
}, | ||
{ | ||
"x": 0, | ||
"y": 13, | ||
"w": 6, | ||
"h": 13, | ||
"i": "11", | ||
"type": "Widget", | ||
"widget": { | ||
"title": "Possible Leaked Context (Per Minute)", | ||
"tips": "The number of detected leaked contexts per minute, including a label source(value=tracing, ignore)." | ||
}, | ||
"graph": { | ||
"type": "Line", | ||
"step": false, | ||
"smooth": false, | ||
"showSymbol": true, | ||
"showXAxis": true, | ||
"showYAxis": true | ||
}, | ||
"expressions": [ | ||
"meter_java_agent_possible_leaked_context_count" | ||
], | ||
"metricConfig": [ | ||
{ | ||
"label": "count" | ||
} | ||
] | ||
}, | ||
{ | ||
"x": 12, | ||
"y": 13, | ||
"w": 12, | ||
"h": 13, | ||
"i": "8", | ||
"type": "Widget", | ||
"widget": { | ||
"title": "Interceptor Error Count (Per Minute)", | ||
"tips": "The number of errors happened in the interceptor logic per minute, including the label plugin_name and inter_type(constructor, inst, static)." | ||
}, | ||
"graph": { | ||
"type": "Line", | ||
"step": false, | ||
"smooth": false, | ||
"showSymbol": true, | ||
"showXAxis": true, | ||
"showYAxis": true | ||
}, | ||
"expressions": [ | ||
"meter_java_agent_interceptor_error_count" | ||
], | ||
"metricConfig": [ | ||
{ | ||
"label": "count" | ||
} | ||
] | ||
}, | ||
{ | ||
"x": 6, | ||
"y": 13, | ||
"w": 6, | ||
"h": 13, | ||
"i": "15", | ||
"type": "Widget", | ||
"graph": { | ||
"type": "Line", | ||
"step": false, | ||
"smooth": false, | ||
"showSymbol": true, | ||
"showXAxis": true, | ||
"showYAxis": true | ||
}, | ||
"widget": { | ||
"title": "Tracing Context Execution time (ms)", | ||
"tips": "For successfully finished tracing context, it measures every interceptor's time cost." | ||
}, | ||
"expressions": [ | ||
"relabels(meter_java_agent_tracing_context_execution_time_percentile,p='50,75,90,95,99',p='50,75,90,95,99')/1000000" | ||
] | ||
} | ||
], | ||
"layer": "SO11Y_JAVA_AGENT", | ||
"entity": "ServiceInstance", | ||
"name": "Self-Observability-Java-Agent-Instance", | ||
"isRoot": false | ||
} | ||
} | ||
] |
62 changes: 62 additions & 0 deletions
62
...r-starter/src/main/resources/ui-initialized-templates/so11y_java_agent/so11y-service.json
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,62 @@ | ||
[ | ||
{ | ||
"id": "Self-Observability-Java-Agent-Service", | ||
"configuration": { | ||
"children": [ | ||
{ | ||
"x": 0, | ||
"y": 2, | ||
"w": 24, | ||
"h": 38, | ||
"i": "0", | ||
"type": "Widget", | ||
"graph": { | ||
"type": "InstanceList", | ||
"dashboardName": "Self-Observability-Java-Agent-Instance", | ||
"fontSize": 12 | ||
}, | ||
"metricConfig": [ | ||
{ | ||
"label": "Context Creation", | ||
"detailLabel": "context_creation", | ||
"unit": "Per Minute" | ||
}, | ||
{ | ||
"label": "Context Completion", | ||
"unit": "Per Minute", | ||
"detailLabel": "context_completion" | ||
} | ||
], | ||
"expressions": [ | ||
"avg(aggregate_labels(meter_java_agent_created_tracing_context_count,sum)+aggregate_labels(meter_java_agent_created_ignored_context_count,sum))", | ||
"avg(meter_java_agent_finished_tracing_context_count+meter_java_agent_finished_ignored_context_count)" | ||
], | ||
"subExpressions": [ | ||
"aggregate_labels(meter_java_agent_created_tracing_context_count,sum)+aggregate_labels(meter_java_agent_created_ignored_context_count,sum)", | ||
"meter_java_agent_finished_tracing_context_count+meter_java_agent_finished_ignored_context_count" | ||
] | ||
}, | ||
{ | ||
"x": 0, | ||
"y": 0, | ||
"w": 24, | ||
"h": 2, | ||
"i": "100", | ||
"type": "Text", | ||
"graph": { | ||
"fontColor": "theme", | ||
"backgroundColor": "theme", | ||
"content": "The self observability of SkyWalking Java Agent, which provides the abilities to measure the tracing performance and error statistics of plugins.", | ||
"fontSize": 14, | ||
"textAlign": "left", | ||
"url": "https://skywalking.apache.org/docs/main/next/en/setup/backend/dashboards-so11y-java-agent/" | ||
} | ||
} | ||
], | ||
"layer": "SO11Y_JAVA_AGENT", | ||
"entity": "Service", | ||
"name": "Self-Observability-Java-Agent-Service", | ||
"isRoot": true | ||
} | ||
} | ||
] |
Submodule skywalking-ui
updated
3 files
+3 −0 | src/locales/lang/menus/en.ts | |
+3 −0 | src/locales/lang/menus/es.ts | |
+2 −0 | src/locales/lang/menus/zh.ts |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a UI PR for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How your preview works without UI change? Is that possible?