mudasobwa
Creator of Cure
I am glad to announce the first Telemetria release. telemetria v0.25.0 — Documentation
It takes care of event registration (through compilation manifest), runtime and release configs (through config provider), and basically allows to wrap any expressions and/or functions to “telemetryized” calls.
If you hesitated to add telemetry to your project, it’s a great time. Example from docs:
defmodule MyMod do
import Telemetria
defpt pi, do: 3.14
deft answer, do: 42 - pi()
def inner do
short_result = t(42 * 42)
result =
t do
# long calculations
:ok
end
end
end
Enjoy. Mode details are in the linked above docs. Feedback is very welcome, as always.
Trending in Announcing
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
I released Doggo, a collection of unstyled Phoenix components.
https://github.com/woylie/doggo
Features
Unstyled Phoenix components....
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
Hey folks,
I just published a post about Hologram’s funding and where the project goes next - the short version:
Curiosum as Main Spons...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
domvas
I can’t tell anything about how it’s working. But one thing keeps me away from using it: the cryptic names.
Reading
deft,defpt,tin some code doesn’t tell me anything about what is it then it makes the understanding harder imo.mudasobwa
Well, either one uses telemetry or not.
If one uses it, each keystroke matters. And since
deftstands fordef+tandtfor telemetry, I am positive it’s not as hard to memorize.Imagine if
Kernel.defp/2macro was calledKernel.define_private_function/2.lpil
Could you expand a bit on what this does? I don’t understand the code snippet.
mudasobwa
The link in the very first line leads to the more-or-less detailed documentation.
lpil
After reading the example and the documentation it’s still not clear to me what this library does, some more detail and examples would be useful! Thanks
dimitarvp
Random notes:
tbe the default wrapping block. Could be something likereport_duration(not sure I am getting this right so the name could be very off) and then you could also have a module we could use like this:use Telemetria.Shortcutswhich aliases the longer name tot?:telemetryat all so to me the statement abouttelemetry: falseis confusing. Not saying programmers shouldn’t do our homework but in my eyes, if you went through the trouble to make an easier-to-use wrapper, you might as well also add some hand-holding quick explanations about:telemetryitself.:telemetrymodule, I have zero clue whatdeftanddefptwrap in terms ofdefordefpexactly? Aredeftanddefptfunctions that always yield telemetry events?I am grateful for your efforts. But to me an even better onboarding would be to include things that you seem to find superfluous and/or easy to locate in other sources. It’d save time for interested users like myself if all needed info to start with
:telemetrywas in your docs as well.mudasobwa
OK, I will try.
deft/2anddefpt/2are simply wrappers forKernel.def/2andKernel.defp/2respectively. They are somewhat similar to AOParoundaspect, mesauring the time spent in the function itself and sending the telemetry event.t/2does the same for anonymous functions and expressions. The latter also allows to pass context as the second parameter to be attached to the event.Events automatically get the names based on modules / functions (configurable) and the events are registered within
:telemetryautomagically by a compiler.In general, it allows to have zero boilerplate when working with complicated/huge set of
:telemetryevents.I hope it became a bit clearer.
mudasobwa
Thanks, fixed!
Sounds reasonable. I’d love to collect more opinions, but atm I think that’s the way to go.
Basically one might configure functions that would be excluded from wrapping into
:telemetrydespite they are still declared withdeft/defptwith zero overhead (compile-time purge.)I honestly thought
:telemetryis something likeJasonnowadays, everyone should have at least read about;Phoenixdocs mention it,Ectodocs do, etc.I will try to add a couple of sentences, but I definitely want to avoid being DHH here. If one have never heard about
:telemetry, they probably should have started with:telemetryitself to understand how it works in a nutshell, and only then come for libraries hiding the boilerplate.:telemetryis a side effect. Both would behave exactly asdef/2anddefp/2from the consumer point of view. Only side effect of sending:telemetryevents would happen under the hood.mudasobwa
BTW, you always might do
dimitarvp
Sure, that’s your choice to make and I am not trying to change your mind. It’s simply my observation that very fast onboarding makes people much more likely to use a library. When all the info is at the same page, people are more willing to try.
I know what
I openly used the term “hand-holding” and I meant it. 
:telemetryis, it’s just that I never used it so far (and I want to). What I was saying was that your library could have finally made me try it but not if I have to dig separately.But again, it’s your choice. Thanks for sharing your thought process.