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

Origin metrics for request cancellations count all requests #199

Closed
kvosper opened this issue Jul 2, 2018 · 1 comment
Closed

Origin metrics for request cancellations count all requests #199

kvosper opened this issue Jul 2, 2018 · 1 comment
Assignees

Comments

@kvosper
Copy link
Contributor

kvosper commented Jul 2, 2018

The problem

The metric <prefix>.origins.<origin-id>.requests.cancelled.count counts all requests, not just cancelled requests.

Detailed description

StyxHttpClient assumes that any unsubscription is a cancellation and updates the origin cancellation metrics accordingly.

In reality, RxJava calls unsubscribe whenever an observable terminates.

We need a way to allow StyxHttpClient to distinguish cancellations from other situations.

Acceptance criteria

  • Unsubscriptions that are part of the normal flow should not be recorded as cancellations
  • Real cancellations should still be recorded
@kvosper kvosper changed the title StyxHttpClient counts request completions as cancellations Origin metrics for request cancellations count all requests Jul 3, 2018
@kvosper kvosper self-assigned this Jul 3, 2018
@mikkokar mikkokar assigned mikkokar and unassigned kvosper Jul 10, 2018
mikkokar added a commit to mikkokar/styx that referenced this issue Jul 10, 2018
mikkokar added a commit to mikkokar/styx that referenced this issue Jul 10, 2018
mikkokar added a commit that referenced this issue Jul 10, 2018
@mikkokar
Copy link
Contributor

Merged to both master and styx-1.0-dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants