Skip to content

Fix getEnhancedMetricTags on local env #87

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

Merged
merged 4 commits into from
Aug 19, 2020

Conversation

jeromemacias
Copy link
Contributor

@jeromemacias jeromemacias commented Jul 30, 2020

What does this PR do?

It fixes usage of wrapper in local env, where functionArn context is not set.

See this comment : 4bb170c#r41043013

@jeromemacias jeromemacias requested a review from a team as a code owner July 30, 2020 15:41
@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2020

Codecov Report

Merging #87 into master will increase coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
+ Coverage   90.01%   90.22%   +0.21%     
==========================================
  Files          26       26              
  Lines         841      839       -2     
  Branches      142      141       -1     
==========================================
  Hits          757      757              
+ Misses         55       54       -1     
+ Partials       29       28       -1     
Impacted Files Coverage Δ
src/metrics/enhanced-metrics.ts 91.42% <100.00%> (+4.94%) ⬆️
src/trace/context.ts 94.67% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 317796f...f1dcbb6. Read the comment docs.

@jeromemacias jeromemacias force-pushed the enhanced_metrics_local branch from 14ddbdc to 7867f8b Compare August 3, 2020 23:48
Copy link
Contributor

@hghotra hghotra left a comment

Choose a reason for hiding this comment

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

👍

@@ -64,6 +65,7 @@ describe("getEnhancedMetricTags", () => {
mockedGetProcessVersion.mockReturnValue("v8.10.0");
expect(getEnhancedMetricTags(mockContextLocal)).toStrictEqual([
"functionname:my-test-lambda",

Copy link
Contributor

Choose a reason for hiding this comment

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

✂️

@hghotra hghotra merged commit 69adaa9 into DataDog:master Aug 19, 2020
@jeromemacias jeromemacias deleted the enhanced_metrics_local branch August 19, 2020 15:15
Czechh added a commit that referenced this pull request Aug 19, 2020
* master:
  Fix getEnhancedMetricTags on local env (#87)
  When headers is set to null return undefined (#86)
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