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

feat(agent): Memcached instance metrics with host name #958

Open
wants to merge 52 commits into
base: dev
Choose a base branch
from

Conversation

ZNeumann
Copy link
Contributor

These metrics can be used by the backend to create AWS relationship maps with memcached

@newrelic-php-agent-bot
Copy link

newrelic-php-agent-bot commented Aug 28, 2024

Test Suite Status Result
Multiverse 7/7 passing
SOAK 55/56 passing

@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2024

Codecov Report

Attention: Patch coverage is 96.07843% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.53%. Comparing base (2321b9e) to head (6e720c9).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
agent/php_internal_instrument.c 94.28% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #958      +/-   ##
==========================================
+ Coverage   78.50%   78.53%   +0.03%     
==========================================
  Files         195      196       +1     
  Lines       27057    27108      +51     
==========================================
+ Hits        21241    21290      +49     
- Misses       5816     5818       +2     
Flag Coverage Δ
agent-for-php-7.2 78.55% <96.07%> (+0.03%) ⬆️
agent-for-php-7.3 78.57% <96.07%> (+0.03%) ⬆️
agent-for-php-7.4 78.27% <96.07%> (+0.03%) ⬆️
agent-for-php-8.0 78.29% <95.91%> (+0.03%) ⬆️
agent-for-php-8.1 78.27% <95.91%> (+0.03%) ⬆️
agent-for-php-8.2 77.87% <95.91%> (+0.03%) ⬆️
agent-for-php-8.3 77.87% <95.91%> (+0.03%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

agent/php_memcached.c Outdated Show resolved Hide resolved
agent/php_memcached.h Outdated Show resolved Hide resolved
Copy link
Member

@lavarou lavarou left a comment

Choose a reason for hiding this comment

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

Please address all comments and refactor the code.

@ZNeumann ZNeumann requested a review from lavarou October 3, 2024 15:18
* Purpose : Create a memcached instance metric
*
* Params : 1. The memcached host or socket name as given to Memcached::addServer().
* Must be non-null.
Copy link
Member

Choose a reason for hiding this comment

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

Since this function is a public API, this cannot be guaranteed and therefore this function needs to account for invalid input.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this comment in c8bdfb7. The function can handle NULL

Comment on lines 8 to 9
The agent should report instance metrics when multiple servers are
added at once
Copy link
Member

@lavarou lavarou Oct 3, 2024

Choose a reason for hiding this comment

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

This comment is not accurate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 3364eb0

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.

7 participants