Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ func InitSerializer(logger *zap.Logger, cfg *ExporterConfig, sourceProvider sour
fxutil.FxAgentBase(),
fx.Provide(func() config.Component {
pkgconfig := create.NewConfig("DD")
pkgconfigsetup.InitConfig(pkgconfig)
pkgconfig.BuildSchema()
Comment on lines +125 to +126

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this safe to be called multiple times and/or when there is no actual config?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BuildSchema don't load the config but build internal schema structure used later for validation. It's based on all the BindEnvAndSetDefault calls that register all our settings.

And yes it's safe to call multiple times.


// Set the API Key
pkgconfig.Set("api_key", string(cfg.API.Key), pkgconfigmodel.SourceFile)
Expand Down