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

Metric/mysql innodb mem total #49

Closed
wants to merge 6 commits into from

Conversation

naman47vyas
Copy link

Description:
This PR generated from the context to adding metrics that are not supported by otel itself. The idea being querying the server variables of mysql to create metrics, meanwhile documenting the process of adding a new metric itself.

This PR adds a metric called mysql.innodb.mem_total, indicates the total memory used by the innodb. As of the current state of the PR, the metric is added successfully and the same is reflected by the running mw-agent, however might need some insights in testing as one test (scrape-has-partial-failure) is failing.

Initial investigations reveal that this is due to the discrepancy in the number of actualMetrics(2: mysql.buffer_pool.pages and mysql.innodb.mem_total) and expectedMetrics(1:mysql.buffer_pool.pages). Currently digging in for the reasons for this mismatch.

@naman47vyas
Copy link
Author

naman47vyas commented Apr 4, 2024

The commit makes the test-partial-scrape pass. Did this by adding a metric in expected_partial.yaml:

- description: Total memory used by InnoDB, as shown in the BUFFER POOL AND MEMORY section of SHOW ENGINE INNODB STATUS.
            name: mysql.innodb.mem_total
            gauge:
              dataPoints:
                - asInt: "-1"
                  startTimeUnixNano: "1000000"
                  timeUnixNano: "2000000"
            unit: By

This is done on an assumptions:
1.) You want the metric to fail in the scrape-partial test.
2.) You should get the value of mysql.innodb.mem_total as -1 when it fails.

Copy link

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Apr 23, 2024
Copy link

github-actions bot commented May 7, 2024

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant