Skip to content

Commit e2f04a1

Browse files
committed
OCPBUGS-33715: Add logging for determining the ORG_ID source
1 parent fef2a88 commit e2f04a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/console/telemetry/telemetry.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,12 @@ func GetAccessToken(secretsLister v1.SecretLister) (string, error) {
8787
func GetOrganizationID(telemetryConfig map[string]string, cachedOrganizationID, clusterID, accessToken string) (string, bool) {
8888
customOrganizationID, isCustomOrgIDSet := telemetryConfig["ORGANIZATION_ID"]
8989
if isCustomOrgIDSet {
90+
klog.V(4).Infoln("telemetry config: using custom organization ID")
9091
return customOrganizationID, false
9192
}
9293

9394
if cachedOrganizationID != "" {
95+
klog.V(4).Infoln("telemetry config: using cached organization ID")
9496
return cachedOrganizationID, false
9597
}
9698

@@ -113,6 +115,7 @@ type Organization struct {
113115

114116
// FetchOrganizationID fetches the organization ID using the cluster ID and access token
115117
func FetchOrganizationID(clusterID, accessToken string) (string, error) {
118+
klog.V(4).Infoln("telemetry config: fetching organization ID")
116119
u, err := buildURL(clusterID)
117120
if err != nil {
118121
return "", err // more contextual error handling can be added here if needed

0 commit comments

Comments
 (0)