Skip to content

Commit db850bd

Browse files
authored
Use public function instead of lambda (#119)
Metrics specifications can be copied to many different processes by some of the handlers, this mean that we need to reduce the size of metrics specs as much as possible to perform well in high throughput services. This change replaces lambda with function capture, that not only provides smaller footprint, it also allows some handlers to pattern match on function if needed.
1 parent 74d186e commit db850bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/telemetry_metrics.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ defmodule Telemetry.Metrics do
647647
defp default_metric_options() do
648648
[
649649
tags: [],
650-
tag_values: & &1,
650+
tag_values: &Function.identity/1,
651651
nil: nil,
652652
description: nil,
653653
reporter_options: []

0 commit comments

Comments
 (0)