File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ func NegotiateIncludingOpenMetrics(h http.Header) Format {
115115// for FmtOpenMetrics, but a future (breaking) release will add the Close method
116116// to the Encoder interface directly. The current version of the Encoder
117117// interface is kept for backwards compatibility.
118- func NewEncoder (w io.Writer , format Format ) Encoder {
118+ func NewEncoder (w io.Writer , format Format , options ... ToOpenMetricsOption ) Encoder {
119119switch format {
120120case FmtProtoDelim :
121121return encoderCloser {
@@ -152,7 +152,7 @@ func NewEncoder(w io.Writer, format Format) Encoder {
152152case FmtOpenMetrics_0_0_1 , FmtOpenMetrics_1_0_0 :
153153return encoderCloser {
154154encode : func (v * dto.MetricFamily ) error {
155- _ , err := MetricFamilyToOpenMetrics (w , v )
155+ _ , err := MetricFamilyToOpenMetrics (w , v , options ... )
156156return err
157157},
158158close : func () error {
You can’t perform that action at this time.
0 commit comments