mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 01:52:26 -05:00
[chore] Update usage of OTEL libraries (#2725)
* otel to 1.24 * prometheus exporter to 0.46 * bunotel to 1.1.17 Also: * Use schemaless URL for metrics * Add software version to tracing schema
This commit is contained in:
parent
8e88ee8d9c
commit
5e871e81a8
126 changed files with 12940 additions and 2267 deletions
27
vendor/go.opentelemetry.io/otel/exporters/prometheus/config.go
generated
vendored
27
vendor/go.opentelemetry.io/otel/exporters/prometheus/config.go
generated
vendored
|
|
@ -19,18 +19,20 @@ import (
|
|||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/sdk/metric"
|
||||
)
|
||||
|
||||
// config contains options for the exporter.
|
||||
type config struct {
|
||||
registerer prometheus.Registerer
|
||||
disableTargetInfo bool
|
||||
withoutUnits bool
|
||||
withoutCounterSuffixes bool
|
||||
readerOpts []metric.ManualReaderOption
|
||||
disableScopeInfo bool
|
||||
namespace string
|
||||
registerer prometheus.Registerer
|
||||
disableTargetInfo bool
|
||||
withoutUnits bool
|
||||
withoutCounterSuffixes bool
|
||||
readerOpts []metric.ManualReaderOption
|
||||
disableScopeInfo bool
|
||||
namespace string
|
||||
resourceAttributesFilter attribute.Filter
|
||||
}
|
||||
|
||||
// newConfig creates a validated config configured with options.
|
||||
|
|
@ -151,3 +153,14 @@ func WithNamespace(ns string) Option {
|
|||
return cfg
|
||||
})
|
||||
}
|
||||
|
||||
// WithResourceAsConstantLabels configures the Exporter to add the resource attributes the
|
||||
// resourceFilter returns true for as attributes on all exported metrics.
|
||||
//
|
||||
// The does not affect the target info generated from resource attributes.
|
||||
func WithResourceAsConstantLabels(resourceFilter attribute.Filter) Option {
|
||||
return optionFunc(func(cfg config) config {
|
||||
cfg.resourceAttributesFilter = resourceFilter
|
||||
return cfg
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue