---
title: "Comment by Manuel Menéndez Alfonso on \"Introduction to Telemetry in Elixir\" | Hashnode"
description: "Great article!!! As you say, we could send telemetry reports to an external service. In that case, it occurs to me that we could use a Task to do it. For exampl"
url: "https://hashnode.com/posts/introduction-to-telemetry-in-elixir/61fbb8d843e34d1181698f35/comment/6209991a52bfb318205e5833"
---

[Discussion](https://hashnode.com/posts/introduction-to-telemetry-in-elixir/61fbb8d843e34d1181698f35)

Comment [Introduction to Telemetry in Elixir](https://hashnode.com/posts/introduction-to-telemetry-in-elixir/61fbb8d843e34d1181698f35)

[Manuel Menéndez Alfonso](https://hashnode.com/@hudsonbay)

[Feb 13, 2022](https://hashnode.com/posts/introduction-to-telemetry-in-elixir/61fbb8d843e34d1181698f35/comment/6209991a52bfb318205e5833)

Great article!!!

As you say, we could send telemetry reports to an external service. In that case, it occurs to me that we could use a Task to do it.

For example:

```
  def handle_event([:grocery, :store, :sale], measurements, metadata, _config) do
    Task.start(fn ->
      :timer.sleep(5_000)
      Logger.info("[Sale telemetry: #{measurements.total}] total for #{metadata.product}")
    end)
  end
```

In this case, `:timer.sleep(5_000)` would be the time it takes to send the info to that service (a lot 😂😂😂). It's just an example.

But we wouldn't be blocking the function then.

My question is:

Do you recommend doing it like that? Is there a recommended way of doing it or it's fine like that?

[Miguel Cobá](https://hashnode.com/@miguelcoba)

[Feb 14, 2022](https://hashnode.com/posts/introduction-to-telemetry-in-elixir/61fbb8d843e34d1181698f35/comment/6209991a52bfb318205e5833#reply-620a34194e82f0219d8f95b8)

Hi Manuel, that's certainly a way to do it asynchronously and without blocking our main process. It is a valid way to do it for sure. Most of the implementations that send data to external monitoring systems, like sentry or appsignal, do this using a GenServer that buffers the data and also doesn't block the main process. After a while, the genserver sends the accumulated data to the monitoring service. Of course it could just send each event every time it happens too. But as you correctly say, the principal thing to have in mind is to do it asynchronously.

Have a nice day!

BTW, today I publish the second part of this series!
