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

ML-1213 Move to server event response to trigger send of metrics #14

Merged
merged 9 commits into from Aug 12, 2019

Conversation

clok
Copy link
Contributor

@clok clok commented Aug 12, 2019

  • Moved the trigger of the send to Datadog from the onPreResponse lifecycle to triggering on the response event.
  • Added helper methods
    • injectMetricTags: Adds custom tags to a request instance
    • injectMetrics: Allows for specific metrics to be added to the request instance
  • Port from jasmine to jest

@clok clok added the feature New feature or request label Aug 12, 2019
@clok clok added this to the 1.0.0 milestone Aug 12, 2019
@clok clok requested a review from a team August 12, 2019 20:08
@clok clok self-assigned this Aug 12, 2019
@ghost ghost requested review from marc-morris and paulojblack and removed request for a team August 12, 2019 20:08
@clok clok requested a review from mrlannigan August 12, 2019 20:08
@@ -41,6 +43,18 @@ const tagMap = {
http_method: getHttpMethod
};

exports.injectMetricTags = ({ request, tags }) => {
const ogTags = get(request, 'plugins.dogstatsd.tags', []);

Choose a reason for hiding this comment

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

@clok clok merged commit f1ccbf2 into master Aug 12, 2019
@clok clok deleted the feature/ML-1213 branch August 12, 2019 21:40
@clok clok mentioned this pull request Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

2 participants