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

splunk hec logs #107

Merged
merged 28 commits into from
Nov 1, 2024
Merged

splunk hec logs #107

merged 28 commits into from
Nov 1, 2024

Conversation

ericbuckley
Copy link
Collaborator

@ericbuckley ericbuckley commented Oct 30, 2024

Description

Adding a new SplunkHandler that can emit logs to a Splunk HEC instance if configured.

Related Issues

closes #83

Additional Notes

The SplunkHandler is using threading to make the actual send to the HEC. This is to not block on the IO of sending the data over the network. Instead we just fire the log entry over in the background and move forward. Now there is a risk that the data never makes it to the HEC, and we don't know about it, but for this use case that is an acceptable risk.

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

@ericbuckley ericbuckley self-assigned this Oct 30, 2024
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 94.25287% with 5 lines in your changes missing coverage. Please review.

Project coverage is 95.11%. Comparing base (800265a) to head (d567605).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/recordlinker/splunk.py 89.36% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   95.18%   95.11%   -0.07%     
==========================================
  Files          25       26       +1     
  Lines        1183     1269      +86     
==========================================
+ Hits         1126     1207      +81     
- Misses         57       62       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ericbuckley ericbuckley marked this pull request as ready for review October 31, 2024 03:28
@ericbuckley ericbuckley merged commit fc0d164 into main Nov 1, 2024
11 checks passed
@ericbuckley ericbuckley deleted the feature/83-splunk-hec-logs branch November 1, 2024 15:38
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.

Send logs and metrics to an optional splunk HEC
2 participants