Giter Site home page Giter Site logo

Comments (2)

bluekeyes avatar bluekeyes commented on May 31, 2024

In our own usage, we always end up exporting to Datadog, so I don't have much experience with HTTP exporters. If you don't have a preference for the HTTP format, your example looks correct and is probably the easiest approach, since it uses the standard library and no new third-party libraries.

Another options might be to expose the metrics in Prometheus/OpenMetrics format, which has become pretty common for exposing service metrics over HTTP. You can take advantage of this format and the libraries even if you are not using the Prometheus application itself to aggregate or visualize your metrics.

  • go-metrics-prometheus provides a connection between go-metrics and the Prometheus library's internal metric store
  • The promhttp package provides HTTP handlers to expose the Prometheus metrics (typically on the /metrics route)

Using the Prometheus format is more complicated to set up (and I haven't personally tried doing it), but it might be worthwhile depending on how you plan to consume the metrics.

from go-githubapp.

andygrunwald avatar andygrunwald commented on May 31, 2024

Thanks a lot, @bluekeyes!
This makes totally sense.

I will keep the current implementation and evaluate the prometheus one soon. Thanks again.

from go-githubapp.

Related Issues (20)

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.