opentelemetry-go icon indicating copy to clipboard operation
opentelemetry-go copied to clipboard

Add Histogram Support to STDOUT Exporter

Open MrAlias opened this issue 5 years ago • 3 comments

The aggregation should be output with the bucket/count pairs being displayed to the user.

MrAlias avatar Jul 21 '20 15:07 MrAlias

@MrAlias I would like to take this issue.

mujtaba-ahmed12 avatar Jul 22 '20 21:07 mujtaba-ahmed12

This could use the format embraced by Prometheus for the boundaries as "le" labels.

The upper boundary at 1 is encoded as a label "le=1" in this scheme.

jmacd avatar Jul 23 '20 16:07 jmacd

This could use the format embraced by Prometheus for the boundaries as "le" labels.

The upper boundary at 1 is encoded as a label "le=1" in this scheme.

Given our existing JSON structure here I had originally though something like:

type expoLine struct {
	Name      string      `json:"name"`
...
	Histogram []bucket    `json:"histogram,omitempty"`
}

type boundary struct {
	Min float64 `json:"min"`
	Max float64 `json:"max"`
}

type bucket struct {
	boundary `json:"bounds"`
	Count    float64 `json:"count"`
}

But, I wonder if we couldn't also have a form of the exporter export prometheus metrics. They are text based and well known.

Maybe add as option like PrettyPrint?

MrAlias avatar Jul 23 '20 16:07 MrAlias

Resolved by https://github.com/open-telemetry/opentelemetry-go/pull/3175

MrAlias avatar Oct 12 '22 19:10 MrAlias