Git Product home page Git Product logo

go-splunk-http's People

Contributors

alinvd avatar antoineco avatar atoulme avatar codydwjones avatar ivan-californias avatar mchaynes avatar sergolius avatar tris avatar zachtimusprime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-splunk-http's Issues

http connection not closing properly

If you are moving a high volume of messages to splunk, the doRequest (splunk/splunk.go) function is not properly closing the http request and you quickly run out of file descriptors. The code below should be added before each of the returns on lines 164 and 173. It's better not to use the "defer" as this also waits longer than necessary to close the connection.

if res != nil {
	res.Body.Close()
}

Cannot import v2 into project using modules

The latest release tag cannot be used:

$ mkdir repro
$ cd repro
$ go mod init github.com/CodyDWJones/repro
$ go get github.com/ZachtimusPrime/Go-Splunk-HTTP/v2
go get github.com/ZachtimusPrime/Go-Splunk-HTTP/v2: module github.com/ZachtimusPrime/Go-Splunk-HTTP@upgrade found (v0.0.0-20201008172325-b298e35fa174), but does not contain package github.com/ZachtimusPrime/Go-Splunk-HTTP/v2

The following fails too but that's expected since v2 is considered to contain breaking changes:

$ go get github.com/ZachtimusPrime/[email protected]
go get github.com/ZachtimusPrime/[email protected]: github.com/ZachtimusPrime/[email protected]: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

Include a logrus hook that will automatically forward logs to splunk

It would be nice if this package included a hook for Logrus (and others, maybe even implement the Logger interface) that would automatically send logs to splunk.

The hook/logger would preferably do async logging, and batch up log events to send to splunk.

splunk.Client would probably be the one to implement the interface, or have a function that would return the logger.

Would this be in scope for this library? I'd like to implement it here so I don't have to implement it elsewhere :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.