-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add region and instance id to logger #142
Conversation
Hey @supabase/dashbit, is there an easy way to globally set up a value in metadata for all processes? For example, it would be nice to see the region and instance id values in all log messages |
Starting from Elixir v1.15, you should be able to set metadata in your config/runtime.exs:
|
Wow, nice! But we cannot upgrade to v1.15 because one of our dependencies doesn't support this version. We'll try to upgrade it first |
Which dep is problematic? Anyway, you can also do this in your application.ex:
It requires Erlang/OTP 24. |
the Logflare Erlang client uses Etso, which doesn't work with Erlang 26 due to an old Ecto version == Compilation error in file lib/ecto/query.ex ==
** (Kernel.TypespecError) lib/ecto/query.ex:430: type dynamic/0 is a built-in type and it cannot be redefined
(elixir 1.15.4) lib/kernel/typespec.ex:961: Kernel.Typespec.compile_error/2
(stdlib 5.0.2) lists.erl:1599: :lists.foldl_1/3
(elixir 1.15.4) lib/kernel/typespec.ex:226: Kernel.Typespec.translate_typespecs_for_module/2
That works perfectly, thanks! 🔥 |
This PR adds the
region
andinstance id
to the logger metadata for the client/db handlers and manager process.