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

chore: aggregate request metric per route #1225

Merged
merged 2 commits into from
Mar 9, 2023
Merged

chore: aggregate request metric per route #1225

merged 2 commits into from
Mar 9, 2023

Conversation

jyeshe
Copy link
Member

@jyeshe jyeshe commented Mar 9, 2023

refs #1141

@jyeshe jyeshe requested a review from sborrazas March 9, 2023 10:59
@jyeshe jyeshe self-assigned this Mar 9, 2023
duration = System.monotonic_time(:millisecond) - conn.assigns.start_time

with %{route: route} <-
Phoenix.Router.route_info(AeMdwWeb.Router, conn.method, conn.request_path, conn.host),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we pattern-match these out of the Conn struct? That way we get compiler errors if there's any typo

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, tests would fail but changed to pattern matching style.

@jyeshe jyeshe requested a review from sborrazas March 9, 2023 14:39
Copy link
Contributor

@sborrazas sborrazas left a comment

Choose a reason for hiding this comment

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

thanks 🙏

@jyeshe jyeshe merged commit 2f55ac3 into master Mar 9, 2023
@jyeshe jyeshe deleted the request-span branch March 9, 2023 15:16
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.

None yet

2 participants