-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removes the functionality of the Describe in prometheus exporter. (#3342
) * remove prom exporter Describe * Apply suggestions from code review Co-authored-by: Tyler Yahn <[email protected]> Co-authored-by: Tyler Yahn <[email protected]>
- Loading branch information
1 parent
0963f59
commit 8b25cb2
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,13 +69,11 @@ func New(opts ...Option) (*Exporter, error) { | |
|
||
// Describe implements prometheus.Collector. | ||
func (c *collector) Describe(ch chan<- *prometheus.Desc) { | ||
metrics, err := c.reader.Collect(context.TODO()) | ||
if err != nil { | ||
otel.Handle(err) | ||
} | ||
for _, metricData := range getMetricData(metrics) { | ||
ch <- metricData.description | ||
} | ||
// The Opentelemetry SDK doesn't have information on which will exist when the collector | ||
// is registered. By returning nothing we are an "unchecked" collector in Prometheus, | ||
// and assume responsibility for consistency of the metrics produced. | ||
// | ||
// See https://pkg.go.dev/github.com/prometheus/[email protected]/prometheus#hdr-Custom_Collectors_and_constant_Metrics | ||
} | ||
|
||
// Collect implements prometheus.Collector. | ||
|