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

Fix missing import in PHP-FPM's check #12365

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

DennisCGc
Copy link
Contributor

What does this PR do?

This PR fixes the PHP-FPM status read out using FastCGI. sys is used in determining the default encoding when retrieving the data on FCGI_STDERR in Python 3. Failing to import it causes the plugin to crash.

Motivation

We'd like to collect metrics from & monitor our PHP-FPM instances using DataDog, but we don't want to expose those metrics using HTTP.

Additional Notes

There are no tests for handling the UNIX path case, but we configured our instances such that they are only accessible by a UNIX socket. I'm unsure as to how to add those tests. If you need tests, I'd like to give a try adding them.

I've also searched the issue list before creating this PR, and it seems #11480 was already created but closed, due to the fact that the bug report was incomplete.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

sys is used in determining the default encoding when retrieving the
data on FCGI_STDERR
@DennisCGc DennisCGc requested a review from a team as a code owner June 14, 2022 13:01
@codecov
Copy link

codecov bot commented Jun 14, 2022

Codecov Report

Merging #12365 (21e6b88) into master (4d92271) will increase coverage by 0.00%.
The diff coverage is n/a.

Flag Coverage Δ
php_fpm 90.25% <ø> (+0.84%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@steveny91 steveny91 merged commit 884a14a into DataDog:master Jun 21, 2022
@steveny91
Copy link
Contributor

Thanks for catching that!

github-actions bot pushed a commit that referenced this pull request Jun 21, 2022
sys is used in determining the default encoding when retrieving the
data on FCGI_STDERR 884a14a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants