Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fxtrace): Updated module name #30

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fxtrace/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ import (
"go.uber.org/fx"
)

const ModuleName = "fx-trace"
// ModuleName is the module name.
const ModuleName = "trace"

// FxTraceModule is the [Fx] trace module.
//
// [Fx]: https://github.com/uber-go/fx
var FxTraceModule = fx.Module(
ModuleName,
fx.Provide(
Expand All @@ -29,6 +33,7 @@ var FxTraceModule = fx.Module(
),
)

// FxTraceParam allows injection of the required dependencies in [NewFxTracerProvider].
type FxTraceParam struct {
fx.In
LifeCycle fx.Lifecycle
Expand All @@ -37,6 +42,7 @@ type FxTraceParam struct {
Config *config.Config
}

// NewFxTracerProvider returns a [otelsdktrace.TracerProvider].
func NewFxTracerProvider(p FxTraceParam) (*otelsdktrace.TracerProvider, error) {
ctx := context.Background()

Expand Down
Loading