promexporter

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package promexporter is the one-liner bridge from an OTel MeterProvider into a prometheus.Registerer. Use this when the surrounding application scrapes via Prometheus and you still want SDK code to depend only on the OTel metric API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMeterProvider

func NewMeterProvider(reg prometheus.Registerer, opts ...Option) (metric.MeterProvider, error)

NewMeterProvider returns a MeterProvider whose metrics are registered with the given prometheus.Registerer. Exponential histograms and trace-based exemplars are enabled by default.

Types

type Option

type Option func(*config)

Option tunes NewMeterProvider.

func WithAggregationSelector

func WithAggregationSelector(s sdkmetric.AggregationSelector) Option

WithAggregationSelector overrides the default exponential-histogram selector.

func WithExemplarFilter

func WithExemplarFilter(f exemplar.Filter) Option

WithExemplarFilter overrides the default trace-based exemplar filter.

Jump to

Keyboard shortcuts

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