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

[Feature] Add memory_get_peak_usage to trace information #2832

Closed
TomKeur opened this issue Sep 3, 2024 · 1 comment · Fixed by #2840
Closed

[Feature] Add memory_get_peak_usage to trace information #2832

TomKeur opened this issue Sep 3, 2024 · 1 comment · Fixed by #2840

Comments

@TomKeur
Copy link

TomKeur commented Sep 3, 2024

Describe the feature you'd like

We're running our applications in containers on Kubernetes, the memory_limit in PHP's configuration (php.ini) is still set to legacy 1024MB (this is an old value, and has never changed).

Nobody dares to lower it, because we not have any statistics how much memory we're using.

When checking out a Datadog trace (from PHP) I'm seeing:

{
  "php": {
    "compilation": {
      "total_time_ms": 0
    }
  }
}

Maybe it's an idea, to add : memory_get_peak_usage() to this php information, this could be really useful for us.

For example:

{
  "php": {
    "compilation": {
      "total_time_ms": 0
    },
    "memory": {
      "peak_usage_bytes": 1337
    }
  }
}

Also it would be really useful if we're able to add graphs on a Dashboard, with memory usage :).

Is your feature request related to a problem?

It's hard lowering the value of memory_limit because it's not clear how much memory we're using.

Describe alternatives you've considered

Writing these metrics to an OpenMetrics store, so Prometheus can scrape these.

Additional context

No response

bwoebi added a commit that referenced this issue Sep 6, 2024
Fixes #2832.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
bwoebi added a commit that referenced this issue Sep 6, 2024
Fixes #2832.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@bwoebi
Copy link
Collaborator

bwoebi commented Sep 6, 2024

I have never seen a feature request gaining that many thumbs up in here so quickly :-)

And it's a really easy thing to do - so, here we go, we'll get it with #2840! (in the 1.4.0 release then)

@bwoebi bwoebi closed this as completed Sep 6, 2024
bwoebi added a commit that referenced this issue Sep 6, 2024
Fixes #2832.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants