Skip to content

[Feature] Add memory_get_peak_usage to trace information #2832

@TomKeur

Description

@TomKeur

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions