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

Add host parameter to query logging #11539

Open
2 of 6 tasks
justinabrahms opened this issue Oct 11, 2019 · 1 comment
Open
2 of 6 tasks

Add host parameter to query logging #11539

justinabrahms opened this issue Oct 11, 2019 · 1 comment
Labels
logging-overhaul type: feature For issues and PRs. For new features. Never breaking changes.

Comments

@justinabrahms
Copy link

justinabrahms commented Oct 11, 2019

Issue Description

I would like to know which host I'm executing sql on when connecting to a larger cluster (e.g. read node or write node?). Ideally, the logging parameter in the options object would be passed more data, especially including the hostname.

Is your feature request related to a problem? Please describe.

I'd like to log which host was affected with a particular sql query, so I can trace slow response times to a particular host.

Describe the solution you'd like

Currently, we do something like myModel.findOne({... logging: mylogger }), but mylogger only gets (sql, time) as parameters. I'd like for it to get more information, at least host name.

Why should this be in Sequelize

Sequelize knows the database it's connecting to and is already calling out for logging.

Describe alternatives/workarounds you've considered

I've considered reaching around into the internals of the models code, but it just feels gross and like we'll be brittle on upgrades.

Additional context

n/A

Issue Template Checklist

Is this issue dialect-specific?

  • No. This issue is relevant to Sequelize as a whole.
  • Yes. This issue only applies to the following dialect(s): XXX, YYY, ZZZ

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.
@sushantdhiman sushantdhiman added the type: feature For issues and PRs. For new features. Never breaking changes. label Oct 16, 2019
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2021

This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logging-overhaul type: feature For issues and PRs. For new features. Never breaking changes.
Projects
None yet
Development

No branches or pull requests

4 participants