Open surik opened 8 years ago
For example this module:
defmodule Mapping do use Metricman.Subscription @reporter expose: [:exometer_report_influxdb] scope [:sessions], @reporter do map [:total], [:sessions, :total] map [:access_class, '$access_class'], [:sessions, :access_class '$access_class'] end end
Will generate get/2 function which works like:
get/2
> Mapping.get [:sessions, :access_class, :online], :counter {:ok, {[:sessions, :online, :access_class], [:value], [expose: [:exometer_report_influxdb]]}}
but it is not was expected. The correct result should looks like:
{:ok, {[:sessions, :access_class, :online], [:value], [expose: [:exometer_report_influxdb]]}}
It happens because we have names clashing: :access_class and '$access_class'. If we rename '$access_class' to '$class' all works correct.
:access_class
'$access_class'
'$class'
For example this module:
Will generate
get/2
function which works like:but it is not was expected. The correct result should looks like:
It happens because we have names clashing:
:access_class
and'$access_class'
. If we rename'$access_class'
to'$class'
all works correct.