Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
David.kim/updated lambda forwarder #327
David.kim/updated lambda forwarder #327
Changes from 5 commits
9c2341c
4850aec
88bb75b
4b2f901
550c7d1
7d73d1c
888d0a3
18ad05e
9629afa
59b9f04
8e74aa8
f4aa21b
0b59915
1981f03
d843a9f
58f4757
a221d4e
3ef99ed
4d0e92f
5fa05a3
b63ab4e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a good idea to duplicate
filter_logs(map(...
here. Can you move logic intoforward_logs
, where you have filtered logs (and actual count)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Tian - moved to
forward_logs
and removed duplication of thefilter_logs
callThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more sense to have this logic happen inside the
forward_metrics
function, since it's a small detail which shouldn't /pollute the main (i.e.,datadog_forwarder
) function. I.e., when you read the main function, you can quickly see what this function does on the high level without being distracted by lots of "details".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored/cleaned up so the main function is clean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to keep a counter at all. Why not just submit the
len(metrics)
right away?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed counter construction and submitting telemetry metrics right away (but still need to build the tags list)