metrics

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOne

func AddOne(metricName string)

AddOne This calls NewMeterProvider(), creating a whole new MeterProvider on every invocation. This will result in many 1s being sent as their own unique snowflake 1. This is because the otel.setMeterprovider/otel.getMeterProvider doesn't expose ForceFlush meaning we have to wait a second or so after every command to send the buffered metrics up. This is extremely silly and wtf. Instead we always create a new metricprovider, add a metric anf forceflush it. v0v We tried using the global set/get meterprovider but that does not give forceflush and instead you end up doing a sleep(2s) to get the metrics sent which is maybe not the best ux I can imagine.

func CollectCommandHistogram

func CollectCommandHistogram(commands []*cli.Command)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL