Skip to content

Commit

Permalink
Use otelsetup.InitWithOptions instead of otelsetup.Init (#575)
Browse files Browse the repository at this point in the history
  • Loading branch information
yamamoto-febc authored Jan 30, 2024
1 parent ea338dc commit bf12438
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ func Execute() {

func execute() error {
// initialize otel SDK
otelShutdown, err := otelsetup.Init(context.Background(), "autoscaler", version.Version)
otelShutdown, err := otelsetup.InitWithOptions(context.Background(), otelsetup.Options{
ServiceName: "autoscaler",
ServiceVersion: version.Version,
ServiceNamespace: "sacloud",
})
if err != nil {
log.Println("Error in initializing OTel SDK: " + err.Error())
return err
Expand Down

0 comments on commit bf12438

Please sign in to comment.