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

[PathPattern] Record and use PathPattern in response #462

Merged
merged 3 commits into from
Dec 22, 2022

Conversation

kolloch
Copy link
Contributor

@kolloch kolloch commented Dec 21, 2022

...so metrics correctly report the innermost PathPattern.

#461

...so metrics correctly report the innermost PathPattern.

poem-web#461
@kolloch kolloch force-pushed the feature/fix-461-http-path-pattern branch from 8798abc to 05d8cf6 Compare December 21, 2022 10:37
Peter Kolloch added 2 commits December 21, 2022 11:42
...that tests whether the middleware sees the innermost PathPattern in
the response.

poem-web#461
@@ -47,7 +47,7 @@ impl<E: Endpoint> Endpoint for TracingEndpoint<E> {
);

if let Some(path_pattern) = req.data::<PathPattern>() {
span.record("path_pattern", path_pattern.0.as_ref());
span.record("path_pattern", &path_pattern.0.as_ref());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunli829 This was necessary to make poem compile locally. Not sure why it passed in CI/CD in the old version.

I compiled with rust 1.65

@sunli829
Copy link
Collaborator

This is a quality PR, thanks a lot! 🙂

@sunli829 sunli829 merged commit 02765a4 into poem-web:master Dec 22, 2022
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

Successfully merging this pull request may close these issues.

2 participants