Skip to content

Conversation

david-gang
Copy link
Contributor

@david-gang david-gang commented Jul 6, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #3549

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The change is trivial as

already tests autimatically the new metrics. The same callback is used.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added - No need as the same metric with the same callback already exist
  • Documentation has been updated - By my understanding should be created automatically

I try to keep this pr as small as possible. After this is merged i want to add the cpython.gc.collected_objects and cpython.gc.uncollectable_objects metrics from https://github.com/open-telemetry/semantic-conventions/blob/2bc97890c1ad82232745b4dd74fd3144476b6a5c/docs/runtime/cpython-metrics.md#metric-cpythongccollected_objects

Copy link

linux-foundation-easycla bot commented Jul 6, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: emdneto / name: Emídio Neto (63bceec)
  • ✅ login: david-gang / name: David Gang (8a51981)
  • ✅ login: aabmass / name: Aaron Abbott (21acd7f, 965736e)

@david-gang david-gang requested a review from a team as a code owner July 6, 2025 13:59
@david-gang
Copy link
Contributor Author

Short question: Should we comment that the old metric is deprecated ?

@david-gang david-gang force-pushed the gc_count_collection_unit branch from d4d91eb to 4003bb0 Compare July 15, 2025 07:00
@david-gang
Copy link
Contributor Author

@emdneto may you please take another look on the PR and see that all your comments were addressed?

@emdneto emdneto changed the title add gc_count metrics with correct collection unit . system-metrics: Add cpython.gc.collections metric Jul 23, 2025
@david-gang david-gang force-pushed the gc_count_collection_unit branch from 4003bb0 to 298a072 Compare July 23, 2025 07:29
@david-gang david-gang force-pushed the gc_count_collection_unit branch from 298a072 to 8a51981 Compare July 23, 2025 07:38
@xrmx xrmx moved this to Reviewed PR that needs fixing in @xrmx's Python PR digest Jul 23, 2025
@david-gang
Copy link
Contributor Author

david-gang commented Jul 24, 2025

@emdneto The failing test is not connected to this PR. Interesting why this happens. It fails in the sqlalchemy tests which was not touched here.

On my local machine the same test passes:

Looks like some flakiness.

tox -e pypy39-test-instrumentation-sqlalchemy-0 -- -ra
.....
.....
============================================================================== short test summary info ==============================================================================
SKIPPED [1] instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py:108: only run async tests for 1.4
SKIPPED [1] instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py:349: only run async tests for 1.4
SKIPPED [1] instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py:384: only run async tests for 1.4
SKIPPED [1] instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py:461: only run async tests for 1.4
SKIPPED [1] instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py:422: only run async tests for 1.4
SKIPPED [1] instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py:502: only run async tests for 1.4
SKIPPED [1] instrumentation/opentelemetry-instrumentation-sqlalchemy/tests/test_sqlalchemy.py:648: only run async tests for 1.4
==================================================================== 36 passed, 7 skipped, 459 warnings in 0.51s ====================================================================
  pypy39-test-instrumentation-sqlalchemy-0: OK (0.75=setup[0.01]+cmd[0.74] seconds)
  congratulations :) (0.98 seconds)

@david-gang
Copy link
Contributor Author

Hi @emdneto, how can we move this forward? The failing unit test doesn’t seem related to my changes, and I don’t have permissions to re-run the workflow. The PR is already approved — is there anything else needed to get it merged?

@aabmass
Copy link
Member

aabmass commented Jul 29, 2025

@david-gang if there are any open comments that you've fixed, please hit the resolve button and I can get this merged

@david-gang
Copy link
Contributor Author

david-gang commented Jul 29, 2025

@david-gang if there are any open comments that you've fixed, please hit the resolve button and I can get this merged

Thanks for clarifying this. In the companies I worked, the reviewers wanted to resolve the conversations themselves. I will do this here.

@david-gang
Copy link
Contributor Author

@david-gang if there are any open comments that you've fixed, please hit the resolve button and I can get this merged

Thanks for clarifying this. In the companies I worked, the reviewers wanted to resolve the conversations themselves. I will do this here.

@aabmass i resolved all open conversations.

@david-gang
Copy link
Contributor Author

Short question: Should we comment that the old metric is deprecated ?

@aabmass do we want to deprecate the old metrics in this PR or in a seperate one? if in this pr, how is this done?

@aabmass
Copy link
Member

aabmass commented Jul 29, 2025

No worries, we are flexible here :)

Short question: Should we comment that the old metric is deprecated ?

@aabmass do we want to deprecate the old metrics in this PR or in a seperate one? if in this pr, how is this done?

Great question, I don't think we have any solid process for this. I would recommend at least mentioning it in the release notes.

@emdneto any thoughts?

@emdneto
Copy link
Member

emdneto commented Jul 29, 2025

No worries, we are flexible here :)

Short question: Should we comment that the old metric is deprecated ?

@aabmass do we want to deprecate the old metrics in this PR or in a seperate one? if in this pr, how is this done?

Great question, I don't think we have any solid process for this. I would recommend at least mentioning it in the release notes.

@emdneto any thoughts?

Thanks @aabmass and @david-gang We should remove that in a separate one once everything is Stable. I believe already have a deprecation notice for process.runtime stuff?

@aabmass
Copy link
Member

aabmass commented Jul 29, 2025

SGTM thank you for the contribution

@aabmass aabmass merged commit 9bf77b5 into open-telemetry:main Jul 29, 2025
625 checks passed
@github-project-automation github-project-automation bot moved this from Reviewed PR that needs fixing to Done in @xrmx's Python PR digest Jul 29, 2025
devmonkey22 pushed a commit to devmonkey22/opentelemetry-python-contrib that referenced this pull request Aug 5, 2025
)

fixes open-telemetry#3549

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

process runtime gc count should not have bytes metrics
4 participants