Comments (3)
for now, i found sort of a way to do it:
in your main app, you can leverage the fact that you have access to c.socket and just do:
c.socket.on('error', function (exception) {
#return console.log ("error event in socket.send(): " + exception);
return;
});
only problem is, node prints stacktraces and I can't find how to disable it. # edit, this seems to have magically fixed itself.
related pull request #18
from node-statsd.
it may be useful to make the client itself an event emitter, this way the user doesn't need to have the knowledge of "socket" and we can emit our own events/errors if need be.
from node-statsd.
the new version adds the ability to provide a callback to each method. the callback returns an error if the message was not sent and returns the number of bytes sent if it was. This has been documented in the readme. Any other socket exceptions are bubbled up and the user can add a listener to it if they please.
from node-statsd.
Related Issues (20)
- dnsCache != cacheDns HOT 1
- Omitting callback may throw uncaught exception HOT 5
- increment(0) == increment(1) HOT 4
- ENOTFOUND on localhost HOT 1
- Don't publish tests to npm HOT 2
- Is sampleRate required for .increment? HOT 1
- node-statsd binds to all hosts by default HOT 1
- Publish 0.1.0 to npm HOT 1
- Sending tags to StatsD give a "Bad line" error HOT 1
- Npm publish v0.1.1 HOT 1
- non-exclusive dgram bind can cause cluster exceptions HOT 1
- how to add mutli entry using line protocol in statsd
- intercept send out metrics
- Problem with fs.appendFile with Statd Client ? HOT 2
- Process never exits after statsd use HOT 4
- Can I use `.send()` to send raw data?
- Data not saved in graphite
- Avoiding DNS Lookups for localhost on socket.send
- F HOT 1
- How can I send the metrics to all the host in docker container?
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 node-statsd.