Skip to content
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

Point d'alerte sur l'usage des handlers de telemetry pour envoi d'email #3454

Open
thbar opened this issue Sep 12, 2023 · 0 comments
Open

Point d'alerte sur l'usage des handlers de telemetry pour envoi d'email #3454

thbar opened this issue Sep 12, 2023 · 0 comments
Labels
dette technique Entretien & maintenance générale, nécessaire pour que le code reste de bonne qualité

Comments

@thbar
Copy link
Contributor

thbar commented Sep 12, 2023

En travaillant sur une implémentation pour :

Je me suis rendu compte qu'on avait peut-être un souci potentiel ici:

def setup, do: :telemetry.attach("oban-logger", [:oban, :job, :exception], &handle_event/4, nil)

On utilise un handler de télémétrie pour notifier des échecs de certains jobs, par email.

Or, comme cela m'est revenu pendant mon implémentation:

Handler code runs inline wherever events are emitted – in the same process emitting the events – which is the reason for those tight constraints around failure. The upside of that approach is that telemetry doesn’t involve message passing, which can be a problem with large enough data as context and/or volume of events.

Ce qui m'a d'ailleurs amené à ouvrir un ticket ici sur le même type de sujet:

L'impact est multiple:

  • l'appel va être synchrone dans l'event handler. Selon comment c'est implémenté, cela pourrait
  • mais surtout, j'ai la sensation qu'une erreur levée dans le code pourrait se traduire par un détachement du handler, et donc un arrêt des notifications (à vérifier)

À creuser donc!

@thbar thbar added the dette technique Entretien & maintenance générale, nécessaire pour que le code reste de bonne qualité label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dette technique Entretien & maintenance générale, nécessaire pour que le code reste de bonne qualité
Projects
None yet
Development

No branches or pull requests

1 participant