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
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.
This library uses Erlang esaml to provide
plug enabl...
New
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub.
Docs are at OpenaiEx User Gu...
New
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly.
One of i...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Other Trending Topics
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
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
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.
We’re particularly inte...
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
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










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.