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

Suggestions: Metrics with trait suggestions #512

Closed
wants to merge 5 commits into from

Conversation

bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Dec 28, 2023

Suggestions for #509

Major changes:

  • Consolidate all header methods to one getMetricHeader for simplicity, and remove applyHeaders
  • If a metrics header is supplied in the metadata, it will be used instead of the default (rather than having multiple metrics headers)
  • Add headers in FetchAuthTokenCache when a cached token is found (rather than in CredentialsLoader)

Minor changes

  • Make $credType a constant and add getCredType method to each Credential (and to UpdateMetadataInterface)
  • Make $metricsHeaderKey a constant and move it to UpdateMetadataInterface::METRIC_METADATA_KEY (to be consistent with AUTH_METADATA_KEY)
  • Rename all $metricsHeaders parameters to $headers, as this is more accurate.
  • Import MetricsTrait in UpdateMetadataTrait (since it depends on this)
  • Make getVersion private

@bshaffer bshaffer closed this Jan 9, 2024
@bshaffer
Copy link
Contributor Author

bshaffer commented Jan 9, 2024

Closing because these suggestions have been implemented

@bshaffer bshaffer deleted the metrics-with-trait-suggestions branch January 9, 2024 17:15
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.

1 participant