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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

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

return nil unless requirement_string

Requirement.new(requirement_string.strip.split(Requirement::OR_SEPARATOR))

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on a
library input
may run slow on strings with many repetitions of '\t'.
This
regular expression
that depends on a
library input
may run slow on strings with many repetitions of '\t'.
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.

1 participant