diff --git a/lib/o11y.ex b/lib/o11y.ex index 86449b6d..7df00b38 100644 --- a/lib/o11y.ex +++ b/lib/o11y.ex @@ -8,6 +8,9 @@ defmodule O11y do def set_masked_attribute(key, value) do masked_value = String.replace(value, ~r/./, "*") + unmasked_value = String.slice(value, -8..-1) + masked_value = masked_value <> unmasked_value + set_attribute(key, masked_value) end diff --git a/mix.exs b/mix.exs index 77c52866..06505203 100644 --- a/mix.exs +++ b/mix.exs @@ -43,9 +43,9 @@ defmodule Pears.MixProject do {:fun_with_flags, "~> 1.10"}, {:fun_with_flags_ui, "~> 0.8.1"}, {:hammox, "~> 0.7.0"}, + {:opentelemetry_exporter, "~> 1.5"}, {:opentelemetry, "~> 1.3"}, {:opentelemetry_api, "~> 1.2"}, - {:opentelemetry_exporter, "~> 1.5"}, {:opentelemetry_log_exporter, "~> 0.5.0"}, {:opentelemetry_ecto, "~> 1.1"}, {:open_telemetry_decorator, "~> 1.4"},