Skip to content

Commit

Permalink
Fix Telemetry Tesla crash
Browse files Browse the repository at this point in the history
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
  • Loading branch information
qgadrian committed Sep 24, 2020
1 parent c461f9b commit 79f7fd4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions apps/smokex_web/lib/smokex_web/telemetry.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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}),
Expand Down

0 comments on commit 79f7fd4

Please sign in to comment.