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

Add Metrics Collection for Composer Ecosystem: Package Manager and Language Details #11025

Merged
merged 11 commits into from
Dec 3, 2024

Conversation

kbukum1
Copy link
Contributor

@kbukum1 kbukum1 commented Nov 27, 2024

What are you trying to accomplish?

This PR enhances metrics collection for the Composer ecosystem by adding the following details:

  • Package Manager Raw Version: Captures the raw version string for better tracking and debugging.
  • Language Raw Version: Logs the raw version of the language used for Composer projects.
  • Language Requirement: Tracks language requirements specified in Composer configurations.

Why:
These additions improve observability and provide detailed insights for Composer ecosystem metrics, helping to better understand versioning and compatibility issues.

What issues does this affect or fix?

N/A

Anything you want to highlight for special attention from reviewers?

  • The new fields for raw versions and requirements have been added to the metrics data structure. Please confirm that the data is collected and logged as expected.
  • Verify that these changes do not affect metrics for other ecosystems.

How will you know you've accomplished your goal?

  • Metrics for Composer now include the raw version and language requirement details when viewed on Datadog.
  • All tests and linters pass successfully.
  • The changes are verified to collect and log the intended data correctly.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@github-actions github-actions bot added the L: php:composer Issues and code for Composer label Nov 27, 2024
@kbukum1 kbukum1 marked this pull request as ready for review December 2, 2024 17:45
@kbukum1 kbukum1 requested a review from a team as a code owner December 2, 2024 17:45
)
end

sig { returns(T.nilable(Ecosystem::VersionManager)) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to return N/A in case this is also not defined instead of nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a instance object, It will be hard to return N/A in case if we don't have version. If we want to do that we need to return T.any(String, Ecosystem::VersionManager), 2 different types which will make it more complicated.

@kbukum1 kbukum1 requested a review from abdulapopoola December 2, 2024 18:16
@kbukum1 kbukum1 merged commit a4a7657 into main Dec 3, 2024
55 checks passed
@kbukum1 kbukum1 deleted the kamil/add_pkg_and_lng_versions_with_reqs_for_composer branch December 3, 2024 20:50
@kbukum1 kbukum1 self-assigned this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: php:composer Issues and code for Composer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants