Giter Club home page Giter Club logo

Comments (3)

vrischmann avatar vrischmann commented on June 16, 2024

Is this something you experienced recently ? I found this which seems related and dates back to 2018. I'm wondering if timers/meters and histograms were broken all this time.

Do you maybe have a reproducer program so that I can test myself ?

And if you want to make a PR that would be cool.

from go-metrics-influxdb.

genturwt avatar genturwt commented on June 16, 2024

yeah, it happened on my services.

I'll try to provide the code to reproduce when I got the time.

from go-metrics-influxdb.

tehsphinx avatar tehsphinx commented on June 16, 2024

I have the same issue. Here my test code to reproduce:

package main

import (
	"math/rand"
	"time"

	"github.com/rcrowley/go-metrics"
	influxdb "github.com/vrischmann/go-metrics-influxdb"
)

func main() {
	go influxdb.InfluxDBWithTags(
		metrics.DefaultRegistry, // metrics registry
		time.Second*10,          // interval
		"http://localhost:8086", // the InfluxDB url
		"metrics",               // your InfluxDB database
		"measurement.default",   // your measurement
		"",                      // your InfluxDB user
		"",                      // your InfluxDB password
		map[string]string{},     // your tag set as map[string]string
		false,                   // align the timestamps
	)

	go randomMeter()

	select {}
}

func randomMeter() {
	m := metrics.NewMeter()
	if err := metrics.Register("Test Meter", m); err != nil {
		panic(err)
	}

	for {
		time.Sleep(1000 * time.Millisecond)
		n := rand.Int63n(10)
		m.Mark(n)
	}
}

from go-metrics-influxdb.

Related Issues (14)

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.