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

Refactor upstream timing capability #19

Merged
merged 2 commits into from
Jan 21, 2020
Merged

Refactor upstream timing capability #19

merged 2 commits into from
Jan 21, 2020

Conversation

jordanholt
Copy link
Contributor

Description

Add the ability to configure which response header to consider when processing the upstream_duration value and provide a simple Date-based fallback if this is not available.

Since existing v1 consumers may be reliant on the "default" header being used, this would incur a breaking change.

Motivation and Context

In v1, an assumption was made that responses would contain a header with the key x-response-time to be used as the upstream duration. We would like to have the ability to configure this header or alternatively calculate this manually.

How Has This Been Tested?

New unit tests added.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jordanholt jordanholt requested a review from a team as a code owner January 20, 2020 15:50
Copy link

@jeanrauwers jeanrauwers left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@drrobharper drrobharper left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jordanholt jordanholt merged commit 0db6d04 into master Jan 21, 2020
@jordanholt jordanholt deleted the upstream-timing branch January 21, 2020 11:52
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.

3 participants