MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / initializeUptraceProvider

Method initializeUptraceProvider

api/pkg/di/container.go:1896–1913  ·  view source on GitHub ↗
(version string, namespace string)

Source from the content-addressed store, hash-verified

1894}
1895
1896func (container *Container) initializeUptraceProvider(version string, namespace string) (flush func()) {
1897 container.logger.Debug("initializing uptrace provider")
1898 // Configure OpenTelemetry with sensible defaults.
1899 uptrace.ConfigureOpentelemetry(
1900 uptrace.WithDSN(os.Getenv("UPTRACE_DSN")),
1901 uptrace.WithServiceName(namespace),
1902 uptrace.WithServiceVersion(version),
1903 uptrace.WithDeploymentEnvironment(os.Getenv("ENV")),
1904 )
1905
1906 // Send buffered spans and free resources.
1907 return func() {
1908 err := uptrace.Shutdown(context.Background())
1909 if err != nil {
1910 container.logger.Error(err)
1911 }
1912 }
1913}
1914
1915func logger(skipFrameCount int) telemetry.Logger {
1916 fields := map[string]string{

Callers

nothing calls this directly

Calls 2

DebugMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected