mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 09:42:26 -05:00
[chore] update go dependencies (#4304)
- github.com/KimMachineGun/automemlimit v0.7.2 => v0.7.3
- github.com/gin-contrib/cors v1.7.5 => v1.7.6
- github.com/minio/minio-go/v7 v7.0.92 => v7.0.94
- github.com/spf13/cast v1.8.0 => v1.9.2
- github.com/uptrace/bun{,/*} v1.2.11 => v1.2.14
- golang.org/x/image v0.27.0 => v0.28.0
- golang.org/x/net v0.40.0 => v0.41.0
- code.superseriousbusiness.org/go-swagger v0.31.0-gts-go1.23-fix => v0.32.3-gts-go1.23-fix
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4304
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
7712885038
commit
8b0ea56027
294 changed files with 139999 additions and 21873 deletions
24
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/doc.go
generated
vendored
24
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/doc.go
generated
vendored
|
|
@ -5,6 +5,18 @@
|
|||
//
|
||||
// The metric events produced are:
|
||||
//
|
||||
// go.memory.used By Memory used by the Go runtime.
|
||||
// go.memory.limit By Go runtime memory limit configured by the user, if a limit exists.
|
||||
// go.memory.allocated By Memory allocated to the heap by the application.
|
||||
// go.memory.allocations {allocation} Count of allocations to the heap by the application.
|
||||
// go.memory.gc.goal By Heap size target for the end of the GC cycle.
|
||||
// go.goroutine.count {goroutine} Count of live goroutines.
|
||||
// go.processor.limit {thread} The number of OS threads that can execute user-level Go code simultaneously.
|
||||
// go.config.gogc % Heap size target percentage configured by the user, otherwise 100.
|
||||
//
|
||||
// When the OTEL_GO_X_DEPRECATED_RUNTIME_METRICS environment variable is set to
|
||||
// true, the following deprecated metrics are produced:
|
||||
//
|
||||
// runtime.go.cgo.calls - Number of cgo calls made by the current process
|
||||
// runtime.go.gc.count - Number of completed garbage collection cycles
|
||||
// runtime.go.gc.pause_ns (ns) Amount of nanoseconds in GC stop-the-world pauses
|
||||
|
|
@ -19,16 +31,4 @@
|
|||
// runtime.go.mem.heap_sys (bytes) Bytes of heap memory obtained from the OS
|
||||
// runtime.go.mem.live_objects - Number of live objects is the number of cumulative Mallocs - Frees
|
||||
// runtime.uptime (ms) Milliseconds since application was initialized
|
||||
//
|
||||
// When the OTEL_GO_X_DEPRECATED_RUNTIME_METRICS environment variable is set to
|
||||
// false, the metrics produced are:
|
||||
//
|
||||
// go.memory.used By Memory used by the Go runtime.
|
||||
// go.memory.limit By Go runtime memory limit configured by the user, if a limit exists.
|
||||
// go.memory.allocated By Memory allocated to the heap by the application.
|
||||
// go.memory.allocations {allocation} Count of allocations to the heap by the application.
|
||||
// go.memory.gc.goal By Heap size target for the end of the GC cycle.
|
||||
// go.goroutine.count {goroutine} Count of live goroutines.
|
||||
// go.processor.limit {thread} The number of OS threads that can execute user-level Go code simultaneously.
|
||||
// go.config.gogc % Heap size target percentage configured by the user, otherwise 100.
|
||||
package runtime // import "go.opentelemetry.io/contrib/instrumentation/runtime"
|
||||
|
|
|
|||
13
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/README.md
generated
vendored
13
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/README.md
generated
vendored
|
|
@ -13,22 +13,13 @@ change in backwards incompatible ways as feedback is applied.
|
|||
|
||||
### Include Deprecated Metrics
|
||||
|
||||
Once new experimental runtime metrics are added, they will be produced
|
||||
**in addition to** the existing runtime metrics. Users that migrate right away
|
||||
can disable the old runtime metrics:
|
||||
|
||||
```console
|
||||
export OTEL_GO_X_DEPRECATED_RUNTIME_METRICS=false
|
||||
```
|
||||
|
||||
In a later release, the deprecated runtime metrics will stop being produced by
|
||||
default. To temporarily re-enable the deprecated metrics:
|
||||
To temporarily re-enable the deprecated metrics:
|
||||
|
||||
```console
|
||||
export OTEL_GO_X_DEPRECATED_RUNTIME_METRICS=true
|
||||
```
|
||||
|
||||
After two additional releases, the deprecated runtime metrics will be removed,
|
||||
Eventually, the deprecated runtime metrics will be removed,
|
||||
and setting the environment variable will no longer have any effect.
|
||||
|
||||
The value set must be the case-insensitive string of `"true"` to enable the
|
||||
|
|
|
|||
20
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/x.go
generated
vendored
20
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/internal/x/x.go
generated
vendored
|
|
@ -9,17 +9,17 @@ package x // import "go.opentelemetry.io/contrib/instrumentation/runtime/interna
|
|||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// DeprecatedRuntimeMetrics is an experimental feature flag that defines if the deprecated
|
||||
// runtime metrics should be produced. During development of the new
|
||||
// conventions, it is enabled by default.
|
||||
//
|
||||
// To disable this feature set the OTEL_GO_X_DEPRECATED_RUNTIME_METRICS environment variable
|
||||
// to the case-insensitive string value of "false" (i.e. "False" and "FALSE"
|
||||
// To enable this feature set the OTEL_GO_X_DEPRECATED_RUNTIME_METRICS environment variable
|
||||
// to the case-insensitive string value of "true" (i.e. "True" and "TRUE"
|
||||
// will also enable this).
|
||||
var DeprecatedRuntimeMetrics = newFeature("DEPRECATED_RUNTIME_METRICS", true)
|
||||
var DeprecatedRuntimeMetrics = newFeature("DEPRECATED_RUNTIME_METRICS", false)
|
||||
|
||||
// BoolFeature is an experimental feature control flag. It provides a uniform way
|
||||
// to interact with these feature flags and parse their values.
|
||||
|
|
@ -43,11 +43,11 @@ func (f BoolFeature) Key() string { return f.key }
|
|||
// Enabled returns if the feature is enabled.
|
||||
func (f BoolFeature) Enabled() bool {
|
||||
v := os.Getenv(f.key)
|
||||
if strings.ToLower(v) == "false" {
|
||||
return false
|
||||
|
||||
val, err := strconv.ParseBool(v)
|
||||
if err != nil {
|
||||
return f.defaultVal
|
||||
}
|
||||
if strings.ToLower(v) == "true" {
|
||||
return true
|
||||
}
|
||||
return f.defaultVal
|
||||
|
||||
return val
|
||||
}
|
||||
|
|
|
|||
91
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/runtime.go
generated
vendored
91
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/runtime.go
generated
vendored
|
|
@ -12,6 +12,7 @@ import (
|
|||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/metric"
|
||||
"go.opentelemetry.io/otel/semconv/v1.34.0/goconv"
|
||||
|
||||
"go.opentelemetry.io/contrib/instrumentation/runtime/internal/deprecatedruntime"
|
||||
"go.opentelemetry.io/contrib/instrumentation/runtime/internal/x"
|
||||
|
|
@ -43,78 +44,48 @@ func Start(opts ...Option) error {
|
|||
metric.WithInstrumentationVersion(Version()),
|
||||
)
|
||||
if x.DeprecatedRuntimeMetrics.Enabled() {
|
||||
return deprecatedruntime.Start(meter, c.MinimumReadMemStatsInterval)
|
||||
if err := deprecatedruntime.Start(meter, c.MinimumReadMemStatsInterval); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
memoryUsedInstrument, err := meter.Int64ObservableUpDownCounter(
|
||||
"go.memory.used",
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Memory used by the Go runtime."),
|
||||
)
|
||||
memoryUsed, err := goconv.NewMemoryUsed(meter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
memoryLimitInstrument, err := meter.Int64ObservableUpDownCounter(
|
||||
"go.memory.limit",
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Go runtime memory limit configured by the user, if a limit exists."),
|
||||
)
|
||||
memoryLimit, err := goconv.NewMemoryLimit(meter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
memoryAllocatedInstrument, err := meter.Int64ObservableCounter(
|
||||
"go.memory.allocated",
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Memory allocated to the heap by the application."),
|
||||
)
|
||||
memoryAllocated, err := goconv.NewMemoryAllocated(meter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
memoryAllocationsInstrument, err := meter.Int64ObservableCounter(
|
||||
"go.memory.allocations",
|
||||
metric.WithUnit("{allocation}"),
|
||||
metric.WithDescription("Count of allocations to the heap by the application."),
|
||||
)
|
||||
memoryAllocations, err := goconv.NewMemoryAllocations(meter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
memoryGCGoalInstrument, err := meter.Int64ObservableUpDownCounter(
|
||||
"go.memory.gc.goal",
|
||||
metric.WithUnit("By"),
|
||||
metric.WithDescription("Heap size target for the end of the GC cycle."),
|
||||
)
|
||||
memoryGCGoal, err := goconv.NewMemoryGCGoal(meter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
goroutineCountInstrument, err := meter.Int64ObservableUpDownCounter(
|
||||
"go.goroutine.count",
|
||||
metric.WithUnit("{goroutine}"),
|
||||
metric.WithDescription("Count of live goroutines."),
|
||||
)
|
||||
goroutineCount, err := goconv.NewGoroutineCount(meter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
processorLimitInstrument, err := meter.Int64ObservableUpDownCounter(
|
||||
"go.processor.limit",
|
||||
metric.WithUnit("{thread}"),
|
||||
metric.WithDescription("The number of OS threads that can execute user-level Go code simultaneously."),
|
||||
)
|
||||
processorLimit, err := goconv.NewProcessorLimit(meter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
gogcConfigInstrument, err := meter.Int64ObservableUpDownCounter(
|
||||
"go.config.gogc",
|
||||
metric.WithUnit("%"),
|
||||
metric.WithDescription("Heap size target percentage configured by the user, otherwise 100."),
|
||||
)
|
||||
configGogc, err := goconv.NewConfigGogc(meter)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
otherMemoryOpt := metric.WithAttributeSet(
|
||||
attribute.NewSet(attribute.String("go.memory.type", "other")),
|
||||
attribute.NewSet(memoryUsed.AttrMemoryType(goconv.MemoryTypeOther)),
|
||||
)
|
||||
stackMemoryOpt := metric.WithAttributeSet(
|
||||
attribute.NewSet(attribute.String("go.memory.type", "stack")),
|
||||
attribute.NewSet(memoryUsed.AttrMemoryType(goconv.MemoryTypeStack)),
|
||||
)
|
||||
collector := newCollector(c.MinimumReadMemStatsInterval, runtimeMetrics)
|
||||
var lock sync.Mutex
|
||||
|
|
@ -124,30 +95,30 @@ func Start(opts ...Option) error {
|
|||
defer lock.Unlock()
|
||||
collector.refresh()
|
||||
stackMemory := collector.getInt(goHeapMemory)
|
||||
o.ObserveInt64(memoryUsedInstrument, stackMemory, stackMemoryOpt)
|
||||
o.ObserveInt64(memoryUsed.Inst(), stackMemory, stackMemoryOpt)
|
||||
totalMemory := collector.getInt(goTotalMemory) - collector.getInt(goMemoryReleased)
|
||||
otherMemory := totalMemory - stackMemory
|
||||
o.ObserveInt64(memoryUsedInstrument, otherMemory, otherMemoryOpt)
|
||||
o.ObserveInt64(memoryUsed.Inst(), otherMemory, otherMemoryOpt)
|
||||
// Only observe the limit metric if a limit exists
|
||||
if limit := collector.getInt(goMemoryLimit); limit != math.MaxInt64 {
|
||||
o.ObserveInt64(memoryLimitInstrument, limit)
|
||||
o.ObserveInt64(memoryLimit.Inst(), limit)
|
||||
}
|
||||
o.ObserveInt64(memoryAllocatedInstrument, collector.getInt(goMemoryAllocated))
|
||||
o.ObserveInt64(memoryAllocationsInstrument, collector.getInt(goMemoryAllocations))
|
||||
o.ObserveInt64(memoryGCGoalInstrument, collector.getInt(goMemoryGoal))
|
||||
o.ObserveInt64(goroutineCountInstrument, collector.getInt(goGoroutines))
|
||||
o.ObserveInt64(processorLimitInstrument, collector.getInt(goMaxProcs))
|
||||
o.ObserveInt64(gogcConfigInstrument, collector.getInt(goConfigGC))
|
||||
o.ObserveInt64(memoryAllocated.Inst(), collector.getInt(goMemoryAllocated))
|
||||
o.ObserveInt64(memoryAllocations.Inst(), collector.getInt(goMemoryAllocations))
|
||||
o.ObserveInt64(memoryGCGoal.Inst(), collector.getInt(goMemoryGoal))
|
||||
o.ObserveInt64(goroutineCount.Inst(), collector.getInt(goGoroutines))
|
||||
o.ObserveInt64(processorLimit.Inst(), collector.getInt(goMaxProcs))
|
||||
o.ObserveInt64(configGogc.Inst(), collector.getInt(goConfigGC))
|
||||
return nil
|
||||
},
|
||||
memoryUsedInstrument,
|
||||
memoryLimitInstrument,
|
||||
memoryAllocatedInstrument,
|
||||
memoryAllocationsInstrument,
|
||||
memoryGCGoalInstrument,
|
||||
goroutineCountInstrument,
|
||||
processorLimitInstrument,
|
||||
gogcConfigInstrument,
|
||||
memoryUsed.Inst(),
|
||||
memoryLimit.Inst(),
|
||||
memoryAllocated.Inst(),
|
||||
memoryAllocations.Inst(),
|
||||
memoryGCGoal.Inst(),
|
||||
goroutineCount.Inst(),
|
||||
processorLimit.Inst(),
|
||||
configGogc.Inst(),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
2
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/version.go
generated
vendored
2
vendor/go.opentelemetry.io/contrib/instrumentation/runtime/version.go
generated
vendored
|
|
@ -5,6 +5,6 @@ package runtime // import "go.opentelemetry.io/contrib/instrumentation/runtime"
|
|||
|
||||
// Version is the current release version of the runtime instrumentation.
|
||||
func Version() string {
|
||||
return "0.61.0"
|
||||
return "0.62.0"
|
||||
// This string is updated by the pre_release.sh script during release
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue