@@ -18,6 +18,7 @@ import (
1818 "github.com/skratchdot/open-golang/open"
1919
2020 "github.com/netbirdio/netbird/client/internal"
21+ "github.com/netbirdio/netbird/client/internal/profilemanager"
2122 "github.com/netbirdio/netbird/client/proto"
2223 nbstatus "github.com/netbirdio/netbird/client/status"
2324 uptypes "github.com/netbirdio/netbird/upload-server/types"
@@ -426,14 +427,20 @@ func (s *serviceClient) collectDebugData(
426427 return "" , err
427428 }
428429
430+ pm := profilemanager .NewProfileManager ()
431+ var profName string
432+ if activeProf , err := pm .GetActiveProfile (); err == nil {
433+ profName = activeProf .Name
434+ }
435+
429436 postUpStatus , err := conn .Status (s .ctx , & proto.StatusRequest {GetFullPeerStatus : true })
430437 if err != nil {
431438 log .Warnf ("Failed to get post-up status: %v" , err )
432439 }
433440
434441 var postUpStatusOutput string
435442 if postUpStatus != nil {
436- overview := nbstatus .ConvertToStatusOutputOverview (postUpStatus , params .anonymize , "" , nil , nil , nil , "" , "" )
443+ overview := nbstatus .ConvertToStatusOutputOverview (postUpStatus , params .anonymize , "" , nil , nil , nil , "" , profName )
437444 postUpStatusOutput = nbstatus .ParseToFullDetailSummary (overview )
438445 }
439446 headerPostUp := fmt .Sprintf ("----- NetBird post-up - Timestamp: %s" , time .Now ().Format (time .RFC3339 ))
@@ -450,7 +457,7 @@ func (s *serviceClient) collectDebugData(
450457
451458 var preDownStatusOutput string
452459 if preDownStatus != nil {
453- overview := nbstatus .ConvertToStatusOutputOverview (preDownStatus , params .anonymize , "" , nil , nil , nil , "" , "" )
460+ overview := nbstatus .ConvertToStatusOutputOverview (preDownStatus , params .anonymize , "" , nil , nil , nil , "" , profName )
454461 preDownStatusOutput = nbstatus .ParseToFullDetailSummary (overview )
455462 }
456463 headerPreDown := fmt .Sprintf ("----- NetBird pre-down - Timestamp: %s - Duration: %s" ,
@@ -574,14 +581,20 @@ func (s *serviceClient) createDebugBundle(anonymize bool, systemInfo bool, uploa
574581 return nil , fmt .Errorf ("get client: %v" , err )
575582 }
576583
584+ pm := profilemanager .NewProfileManager ()
585+ var profName string
586+ if activeProf , err := pm .GetActiveProfile (); err == nil {
587+ profName = activeProf .Name
588+ }
589+
577590 statusResp , err := conn .Status (s .ctx , & proto.StatusRequest {GetFullPeerStatus : true })
578591 if err != nil {
579592 log .Warnf ("failed to get status for debug bundle: %v" , err )
580593 }
581594
582595 var statusOutput string
583596 if statusResp != nil {
584- overview := nbstatus .ConvertToStatusOutputOverview (statusResp , anonymize , "" , nil , nil , nil , "" , "" )
597+ overview := nbstatus .ConvertToStatusOutputOverview (statusResp , anonymize , "" , nil , nil , nil , "" , profName )
585598 statusOutput = nbstatus .ParseToFullDetailSummary (overview )
586599 }
587600
0 commit comments