From 79f7fd4a6314332ddcca09a5311dec320b50aad8 Mon Sep 17 00:00:00 2001 From: qgadrian Date: Thu, 24 Sep 2020 13:50:12 +0200 Subject: [PATCH] Fix Telemetry Tesla crash The :env tag is an struct and only String is supported. To send proper tags we need to attach the function, parse the event and emit it again as different event to be handled by TelemetryStatsD --- apps/smokex_web/lib/smokex_web/telemetry.ex | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/smokex_web/lib/smokex_web/telemetry.ex b/apps/smokex_web/lib/smokex_web/telemetry.ex index 783a7a89..d5c24c89 100644 --- a/apps/smokex_web/lib/smokex_web/telemetry.ex +++ b/apps/smokex_web/lib/smokex_web/telemetry.ex @@ -57,12 +57,9 @@ defmodule SmokexWeb.Telemetry do ), # Tesla Metrics - summary("tesla.request.start.system_time", unit: {:native, :millisecond}, tags: [:env]), - summary("tesla.request.stop.duration", unit: {:native, :millisecond}, tags: [:env, :error]), - summary("tesla.request.exception.duration", - unit: {:native, :millisecond}, - tags: [:kind, :reason] - ), + summary("tesla.request.start.system_time", unit: {:native, :millisecond}), + summary("tesla.request.stop.duration", unit: {:native, :millisecond}), + summary("tesla.request.exception.duration", unit: {:native, :millisecond}), # Database Metrics summary("smokex.repo.query.total_time", unit: {:native, :millisecond}),