Open roidelapluie opened 2 years ago
Rename metric create breaking change with existing use of phpfpm_exporter. Need to deprecate old metric instead of remove (or rename) it
Certainly. The main problem is process_request_duration which now uses the normalized second (https://prometheus.io/docs/practices/naming/#base-units).
For the rest, we could offer recording rules or relabel configs to ease the transition and release a 3.0 maybe.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
All max metrics such as phpfpm_max_children_reached
should be a gauge, no?
I don't understand why they are set as counter. They are not going up for every request and they can go down.
Note that on remote_write
, the type of metrics metadata seems to be not send,
you can rename them:
- url: https://metric-api.newrelic.com/prometheus/v1/write?X-License-Key=...
write_relabel_configs:
- source_labels: [__name__]
regex: ^my_counter$
target_label: newrelic_metric_type
replacement: "counter"
action: replace
Here are a few changes that should bring this exporter closer to Prometheus best practices.
phpfpm_scrape_failures
is a counter and should end with _total. It has been renamed tophpfpm_scrape_failures_total
(https://prometheus.io/docs/instrumenting/writing_exporters/#naming)phpfpm_start_since
has been renamed tophpfpm_start_time_seconds
to match standardprocess_start_time_seconds
and contain unit. It has been changed to a gauge (https://www.robustperception.io/are-increasing-timestamps-counters-or-gauges).phpfpm_accepted_connections
is a counter and should end with _total. It has been renamed tophpfpm_accepted_connections_total
.phpfpm_idle_processes
,phpfpm_active_processes
have been changed tophpfpm_processes{state="active"}
andphpfpm_processes{state="idle"}
.phpfpm_total_processes
has been dropped because it can be found assum without(state) phpfpm_processes
.phpfpm_max_children_reached
is a counter and should end with _total, so it has been renamed tophpfpm_max_children_reached_total
.process_last_request_memory
should contain the unit, so it has been renamed toprocess_last_request_memory_bytes
.process_request_duration
has been normalized to seconds and renamedphpfpm_process_last_request_duration_seconds
.