-
Notifications
You must be signed in to change notification settings - Fork 389
Created a HTTP client to send batch of logs over HTTP to Datadog #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
Conversation
fb5bf9d
to
46c62bf
Compare
822eeff
to
071065d
Compare
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.
As discussed offline, I think it would be worth adding a unit test for some of this, even if it has poor coverage and is not (yet) used by a ci.
thanks @ajacquemot for this first pass. Let's discuss this when you have some time |
a5061c2
to
9e15f59
Compare
9e15f59
to
cff52e8
Compare
2498726
to
9107c87
Compare
759fa06
to
8a8e5dd
Compare
9e236b3
to
825551a
Compare
self.api_key = ddApiKey | ||
self._api_key = api_key | ||
self._scrubber = scrubber | ||
self._timeout = timeout |
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.
_timeout is not used anywhere
afc0069
to
ec0aa06
Compare
) | ||
) | ||
except Exception: | ||
pass |
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.
log the exception here
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.
raise an exception instead, we should not forward the logs if we can't build the rule, the user should fix the pattern instead, thoughts ?
9805b12
to
892fe8b
Compare
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.
We might want to add a comment about the retry logic (and how it's controlled by the lambda timeout)
I find the Exception logic a bit hard to read but I don't have a better solution right now |
What does this PR do?
Added the logic to send logs over HTTP to Datadog:
requests
Motivation
Migrate the integration to th HTTP API
Additional Notes
Need to add unit-tests