Code Monkey home page Code Monkey logo

go-dogstatsd's People

Contributors

andrei-m avatar mkobetic avatar sidgopalan 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

Watchers

 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

go-dogstatsd's Issues

Error events are getting submitted as Info Event for message having \n in Event Body

The error events are getting submitted as info event for event having \n in the event body.

Code :-

package main

import(
 "github.com/ooyala/go-dogstatsd"
 "log"
 "fmt"
)

func main() {
    c,err := dogstatsd.New("127.0.0.1:8125")
    defer c.Close()
    if err != nil {
        log.Fatal(err)
    }
    c.Namespace = "test"
    err = c.Error("Testing", "Testing Hello\n World", nil)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println("Error Event Submitted")
}

The above event in datadog is showing up as info event with Title - Testing and body Testing Hello.

The udp message submitted by go-dogstatsd looks like below:-

_e{13,1681}:Testing |Testing Hello
World|t:error|s:test

It seems the entire message after Testing Hello is getting truncated in datadog. So the event type (t:error) is also getting truncated & by default if the event type is missing in any of the events then it seems datadog treats it as info event.

To check how the event datagram submitted by go-dogstatsd look like I started a tcpdump on port 8125 with the below command and then executed the above code:-

sudo tcpdump -i lo udp port 8125 -vv -X

The outputted datagram look like the below:-

_e{7,20}:Testing|Testing.Hello..World|t:error|s:test

which is not what we want.

If the "Testing Hello\n World" is submitted directly using the below command:-

echo -n "_e{4,21}:Test|Testing Hello\n World" | nc -4u -w1 localhost 8125

Then the outputted datagram look like the below:-

_e{7,20}:Testing|Testing.Hello\n.World|t:error|s:test

Environment

  • Linux x86_64
  • Datadog Agent - 5.4.3

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.