Comments (3)
client...Do() is not a goroutine.
We forked and adapt the code to run in go routine.
Be aware you can't handle the error returned by elasticsearch ...
In our case we don't care, we need the log to be fast. Using the goroutine is 1000 times faster than original code.
from elogrus.
The problem here is that you can leak the goroutines because this concept is fire and forget. And in extream case, you will get in troubles. Maybe this could be handled by pooling, so let's say you can have 20 parallel requests to elastic in one time.
from elogrus.
The asynchronous hook added you can create the async hook by NewAsyncElasticHook function.
from elogrus.
Related Issues (20)
- Push new tag for the current code HOT 1
- Elastic 6.0 support HOT 4
- go get error from gopkg.in HOT 3
- New Trace log level in logrus HOT 2
- logrus's SetReportCaller invalid in elogrus HOT 3
- I'd like to add a mechanism for keeping track of the async hooks
- Hostname in log is getting saved with the credentials
- Elasticsearch 7.0 support HOT 2
- Build Fail in README example code HOT 2
- Can i set username and password for my elasticsearch hosting ? HOT 2
- Apply for the maintainer HOT 1
- Report Caller missing HOT 5
- How do I modify index dynamically?
- missing Tracelevel from v7.0.0 version
- Unable to log to self defined index
- Mapping types deprecated in Elastic v8 HOT 2
- no active connection found: no Elasticsearch node available HOT 1
- remove github.com module path from pkg.go.dev
- Fields are not compatible with ECS
- Elasticsearch 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elogrus.