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

[Feature?]: show function name in _server routes #1795

Open
2 tasks done
loetjvr opened this issue Feb 11, 2025 · 2 comments · May be fixed by #1802
Open
2 tasks done

[Feature?]: show function name in _server routes #1795

loetjvr opened this issue Feb 11, 2025 · 2 comments · May be fixed by #1802
Labels
enhancement New feature or request needs triage

Comments

@loetjvr
Copy link
Contributor

loetjvr commented Feb 11, 2025

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

Currently all server function calls use _server route. It would be easier to log and debug errors if the route has more details eg _server/function-name.

As I understand anything going to _server will be processed in the same function and is just looking for id
and name search prop. So I propose we just add the function name to the url and dont change anything on the logic side.

I am not sure if function extraction is handled by Solid start or Vinxi and also if function name is the name of the function it extracts from or just random cause I am not always able to get a readable function name.

Examples 🌈

Image

Motivation 🔦

We find that with our logging and debugging that having everything go to the same url makes it difficult to know which function is being called and thus difficult to resolve issues or to setup proper observability.

@loetjvr loetjvr added the enhancement New feature or request label Feb 11, 2025
@loetjvr loetjvr linked a pull request Feb 12, 2025 that will close this issue
@atilafassina
Copy link
Member

Hey, @ryansolid
I think we'll need your 2cents on this one.

@loetjvr raises a good point on improving observability of our server-functions, but I'm unsure how this unfolds in our architecture and if there would be another way to achieve that.

@loetjvr
Copy link
Contributor Author

loetjvr commented Feb 14, 2025

it does seem like Tanstack is suggesting to add something in the path looking at the readme

Image

https://github.com/TanStack/router/tree/main/packages/server-functions-plugin#providing-the-wrapper-implementations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants