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

put_path_params: Should it work with query params? #424

Open
wojtekmach opened this issue Oct 21, 2024 · 1 comment
Open

put_path_params: Should it work with query params? #424

wojtekmach opened this issue Oct 21, 2024 · 1 comment

Comments

@wojtekmach
Copy link
Owner

I was surprised this didn't work:

iex> Req.get!("https://httpbin.org/anything?x=:x", path_params: [x: 1]).body["args"]
%{"x" => ":x"}

I mean, it makes sense, it's called path params after all but still. Of course we could do this instead:

iex> Req.get!("https://httpbin.org/anything", params: [x: 1]).body["args"]
%{"x" => "1"}

but with :path_params feature we of course can get better instrumentation. I wonder if status quo is good enough or perhaps we can do some improvements?

cc @bryannaegele @whatyouhide

P.S. We're still planning to emit our own telemetry events, #341.

@whatyouhide
Copy link
Contributor

Maybe we should think about it this way: if someone wants to use the path params in their own tagging system for instrumentation, they should do so in their Telemetry handlers instead?

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

2 participants