mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 06:22:25 -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
|
|
@ -34,7 +34,7 @@ import (
|
|||
"go.opentelemetry.io/otel/metric"
|
||||
sdk "go.opentelemetry.io/otel/sdk/metric"
|
||||
"go.opentelemetry.io/otel/sdk/resource"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -42,7 +42,6 @@ const (
|
|||
)
|
||||
|
||||
func Initialize(db db.DB) error {
|
||||
|
||||
if !config.GetMetricsEnabled() {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -55,8 +54,7 @@ func Initialize(db db.DB) error {
|
|||
|
||||
r, _ := resource.Merge(
|
||||
resource.Default(),
|
||||
resource.NewWithAttributes(
|
||||
semconv.SchemaURL,
|
||||
resource.NewSchemaless(
|
||||
semconv.ServiceName(serviceName),
|
||||
semconv.ServiceVersion(config.GetSoftwareVersion()),
|
||||
),
|
||||
|
|
@ -90,7 +88,6 @@ func Initialize(db db.DB) error {
|
|||
return nil
|
||||
}),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -107,7 +104,6 @@ func Initialize(db db.DB) error {
|
|||
return nil
|
||||
}),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -124,7 +120,6 @@ func Initialize(db db.DB) error {
|
|||
return nil
|
||||
}),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue