Skip to content
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

[Profiling] Differential views based on same data show different values #181886

Closed
rockdaboot opened this issue Apr 26, 2024 · 4 comments · Fixed by #182001
Closed

[Profiling] Differential views based on same data show different values #181886

rockdaboot opened this issue Apr 26, 2024 · 4 comments · Fixed by #182001
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:UniversalProfiling Universal Profiling observability feature Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.14.0

Comments

@rockdaboot
Copy link
Contributor

Kibana version:
8.14-SNAPSHOT

Elasticsearch version:
8.14-SNAPSHOT

Describe the bug:
The summary fields in the differential views for TopN Functions and Flamegraph should show the same values when calculated from the same data. But they don't.

Steps to reproduce:

  1. In the Universal Profiling landing page, select a time range with data in the past (don't use last X minutes/hours/days)
  2. Select the Functions view
  3. Click on the "Differential TopN functions"
  4. In a second browser tab, repeat step 1
  5. In the second browser tab: Select on the Flamegraph view
  6. In the second browser tab: Click on the "Differential Flamegraph"
  7. Compare the values under "Annualized CO2 emission impact", "Annualized cost impact" and "Total number of samples" - they should be identical, but aren't.

Expected behavior:
The summary fields in the differential views should show exactly the same data when based on the same data.

Screenshots (if relevant):
Screenshot_20240426_175652
Screenshot_20240426_175617

@rockdaboot rockdaboot added bug Fixes for quality problems that affect the customer experience v8.14.0 labels Apr 26, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 26, 2024
@smith smith added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Apr 26, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 26, 2024
@smith smith added Feature:UniversalProfiling Universal Profiling observability feature needs-refinement Needs PM's to refine scope labels Apr 26, 2024
@rockdaboot
Copy link
Contributor Author

Just seeing that there is also a little "glitch" in the first screenshot where 0 changes lead to a green arrow up and < 0.01%. It should just be zero without arrow, as seen in the second screenshot.

@rockdaboot
Copy link
Contributor Author

rockdaboot commented Apr 29, 2024

I verified the shown values are delivered by the ES profiling API. My mistake, used the data from Kibana server.
cc: @danielmitterdorfer

@rockdaboot
Copy link
Contributor Author

rockdaboot commented Apr 29, 2024

@cauemarcondes The following needs to be changed:

diff. topN functions - "Total number of samples"

  • Use selfCPU from the Kibana server response, or even better: self_count from the ES response and avoid renaming fields on the Kibana server side. There is no need or use for total_count, TotalCount or totalCPU (IMO these fields can be dropped).

diff. topN functions - "Annualized CO2 / costs"

  • There is a rounding error, that's why the values divert from what is shown in diff. Flamegraph. Please do not sum up any values and use self_annual_co2_tons and self_annual_cost_usd from the ES response.

@cauemarcondes cauemarcondes self-assigned this Apr 29, 2024
@smith smith removed the needs-refinement Needs PM's to refine scope label Apr 29, 2024
cauemarcondes added a commit that referenced this issue Apr 30, 2024
…es (#182001)

Related to #180677
closes #181886

There's still a small difference on the CO2 values, but that's due to
different formats returned by ES apis:
```
TopN Functions
"self_annual_co2_tons": 0.0068555964801996295

Flamegraph
"AnnualCO2TonsInclusive": [
    0.0069,
```

After:
<img width="1765" alt="Screenshot 2024-04-29 at 16 34 57"
src="https://github.com/elastic/kibana/assets/55978943/092a704f-69fe-4dd0-99d5-9ac9bce77188">
<img width="1788" alt="Screenshot 2024-04-29 at 16 35 03"
src="https://github.com/elastic/kibana/assets/55978943/da4a1406-fad7-48de-81ac-e8aae64cba67">
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Apr 30, 2024
…es (elastic#182001)

Related to elastic#180677
closes elastic#181886

There's still a small difference on the CO2 values, but that's due to
different formats returned by ES apis:
```
TopN Functions
"self_annual_co2_tons": 0.0068555964801996295

Flamegraph
"AnnualCO2TonsInclusive": [
    0.0069,
```

After:
<img width="1765" alt="Screenshot 2024-04-29 at 16 34 57"
src="https://github.com/elastic/kibana/assets/55978943/092a704f-69fe-4dd0-99d5-9ac9bce77188">
<img width="1788" alt="Screenshot 2024-04-29 at 16 35 03"
src="https://github.com/elastic/kibana/assets/55978943/da4a1406-fad7-48de-81ac-e8aae64cba67">

(cherry picked from commit cb77c2d)
kibanamachine added a commit that referenced this issue Apr 30, 2024
…nt values (#182001) (#182091)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Profiling] Differential views based on same data show different
values (#182001)](#182001)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Cauê
Marcondes","email":"55978943+cauemarcondes@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-04-30T09:47:33Z","message":"[Profiling]
Differential views based on same data show different values
(#182001)\n\nRelated to
#180677
#181886 still a
small difference on the CO2 values, but that's due to\r\ndifferent
formats returned by ES apis:\r\n```\r\nTopN
Functions\r\n\"self_annual_co2_tons\":
0.0068555964801996295\r\n\r\nFlamegraph\r\n\"AnnualCO2TonsInclusive\":
[\r\n 0.0069,\r\n```\r\n\r\nAfter:\r\n<img width=\"1765\"
alt=\"Screenshot 2024-04-29 at 16 34
57\"\r\nsrc=\"https://github.com/elastic/kibana/assets/55978943/092a704f-69fe-4dd0-99d5-9ac9bce77188\">\r\n<img
width=\"1788\" alt=\"Screenshot 2024-04-29 at 16 35
03\"\r\nsrc=\"https://github.com/elastic/kibana/assets/55978943/da4a1406-fad7-48de-81ac-e8aae64cba67\">","sha":"cb77c2d13eecf92b064328605a34737222fed541","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","ci:project-deploy-observability","v8.14.0","v8.15.0"],"title":"[Profiling]
Differential views based on same data show different
values","number":182001,"url":"#182001
Differential views based on same data show different values
(#182001)\n\nRelated to
#180677
#181886 still a
small difference on the CO2 values, but that's due to\r\ndifferent
formats returned by ES apis:\r\n```\r\nTopN
Functions\r\n\"self_annual_co2_tons\":
0.0068555964801996295\r\n\r\nFlamegraph\r\n\"AnnualCO2TonsInclusive\":
[\r\n 0.0069,\r\n```\r\n\r\nAfter:\r\n<img width=\"1765\"
alt=\"Screenshot 2024-04-29 at 16 34
57\"\r\nsrc=\"https://github.com/elastic/kibana/assets/55978943/092a704f-69fe-4dd0-99d5-9ac9bce77188\">\r\n<img
width=\"1788\" alt=\"Screenshot 2024-04-29 at 16 35
03\"\r\nsrc=\"https://github.com/elastic/kibana/assets/55978943/da4a1406-fad7-48de-81ac-e8aae64cba67\">","sha":"cb77c2d13eecf92b064328605a34737222fed541"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/182001","number":182001,"mergeCommit":{"message":"[Profiling]
Differential views based on same data show different values
(#182001)\n\nRelated to
#180677
#181886 still a
small difference on the CO2 values, but that's due to\r\ndifferent
formats returned by ES apis:\r\n```\r\nTopN
Functions\r\n\"self_annual_co2_tons\":
0.0068555964801996295\r\n\r\nFlamegraph\r\n\"AnnualCO2TonsInclusive\":
[\r\n 0.0069,\r\n```\r\n\r\nAfter:\r\n<img width=\"1765\"
alt=\"Screenshot 2024-04-29 at 16 34
57\"\r\nsrc=\"https://github.com/elastic/kibana/assets/55978943/092a704f-69fe-4dd0-99d5-9ac9bce77188\">\r\n<img
width=\"1788\" alt=\"Screenshot 2024-04-29 at 16 35
03\"\r\nsrc=\"https://github.com/elastic/kibana/assets/55978943/da4a1406-fad7-48de-81ac-e8aae64cba67\">","sha":"cb77c2d13eecf92b064328605a34737222fed541"}}]}]
BACKPORT-->

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
mbondyra pushed a commit to mbondyra/kibana that referenced this issue May 2, 2024
…es (elastic#182001)

Related to elastic#180677
closes elastic#181886

There's still a small difference on the CO2 values, but that's due to
different formats returned by ES apis:
```
TopN Functions
"self_annual_co2_tons": 0.0068555964801996295

Flamegraph
"AnnualCO2TonsInclusive": [
    0.0069,
```

After:
<img width="1765" alt="Screenshot 2024-04-29 at 16 34 57"
src="https://github.com/elastic/kibana/assets/55978943/092a704f-69fe-4dd0-99d5-9ac9bce77188">
<img width="1788" alt="Screenshot 2024-04-29 at 16 35 03"
src="https://github.com/elastic/kibana/assets/55978943/da4a1406-fad7-48de-81ac-e8aae64cba67">
yuliacech pushed a commit to yuliacech/kibana that referenced this issue May 3, 2024
…es (elastic#182001)

Related to elastic#180677
closes elastic#181886

There's still a small difference on the CO2 values, but that's due to
different formats returned by ES apis:
```
TopN Functions
"self_annual_co2_tons": 0.0068555964801996295

Flamegraph
"AnnualCO2TonsInclusive": [
    0.0069,
```

After:
<img width="1765" alt="Screenshot 2024-04-29 at 16 34 57"
src="https://github.com/elastic/kibana/assets/55978943/092a704f-69fe-4dd0-99d5-9ac9bce77188">
<img width="1788" alt="Screenshot 2024-04-29 at 16 35 03"
src="https://github.com/elastic/kibana/assets/55978943/da4a1406-fad7-48de-81ac-e8aae64cba67">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:UniversalProfiling Universal Profiling observability feature Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.14.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants