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

Utilisation de Rollbar pour la remontée d'erreurs dans l'app et dans les scripts #176

Open
gasilber opened this issue Dec 14, 2023 · 0 comments
Assignees

Comments

@gasilber
Copy link
Collaborator

Il y a parfois des erreurs dans les scripts, notamment:

[2023-12-14T05:08:38.667Z][INFO][collect] Collecte de la sources de données : datagouv...
[2023-12-14T05:14:21.885Z][ERROR][script] aborted
Error: aborted
    at connResetException (node:internal/errors:720:14)
    at TLSSocket.socketCloseListener (node:_http_client:461:19)
    at TLSSocket.emit (node:events:529:35)
    at node:net:350:12
    at TCP.done (node:_tls_wrap:614:7)
{ err: {} }
[2023-12-14T05:14:22.169Z][WARN][collect] Erreur lors de la collecte pour l'organisme 77871521900136. { source: 'onisep' }
{
  anomalies: [
    MongoNotConnectedError: MongoClient must be connected to perform this operation
        at getTopology (/app/node_modules/mongodb/lib/utils.js:282:11)
        at /app/node_modules/mongodb/lib/operations/execute_operation.js:19:48
        at maybePromise (/app/node_modules/mongodb/lib/utils.js:409:5)
        at executeOperation (/app/node_modules/mongodb/lib/operations/execute_operation.js:16:37)
        at Collection.updateOne (/app/node_modules/mongodb/lib/collection.js:169:57)
        at markOrganismeAsCollected (/app/src/jobs/collectSources.js:21:37)
        at /app/src/jobs/collectSources.js:225:17
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async ParallelWrite._onWrite (/app/node_modules/oleoduc/lib/writeData.js:99:19) {
      [Symbol(errorLabels)]: Set(0) {}
    }
  ]
}

Ce genre d'erreur devrait être remonté dans une application comme Rollbar (https://rollbar.com) plutôt que dans un channel Slack.

@gasilber gasilber self-assigned this Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant