Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (p *Plugin) Targets() []BuildTarget {
}

func (p *Plugin) SetLogger(logger zerolog.Logger) {
p.logger = logger.With().Str("module", p.name+"-"+string(p.Kind())).Logger()
p.logger = logger
}

func (p *Plugin) Tables(ctx context.Context, options TableOptions) (schema.Tables, error) {
Expand Down
2 changes: 2 additions & 0 deletions serve/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ func (s *PluginServe) newCmdPluginServe() *cobra.Command {
logger = log.Output(zerolog.ConsoleWriter{Out: os.Stdout}).Level(zerologLevel)
}

logger = logger.With().Str("module", s.plugin.Name()+"-"+string(s.plugin.Kind())).Logger()
Copy link
Copy Markdown
Member Author

@erezrokah erezrokah Oct 22, 2024

Choose a reason for hiding this comment

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

Not shown in the diff but we do s.plugin.SetLogger(logger) a bit below


shutdown, err := setupOtel(cmd.Context(), logger, s.plugin, otelEndpoint, otelEndpointInsecure)
if err != nil {
return fmt.Errorf("failed to setup OpenTelemetry: %w", err)
Expand Down