-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
api: cloudprofilerIssues related to the Cloud Profiler API.Issues related to the Cloud Profiler API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.samplesIssues that are directly related to samples.Issues that are directly related to samples.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
In which file did you encounter the issue?
golang-samples/profiler/export/main.go
Line 104 in 66fabfc
labelBytes, err := json.Marshal(profile.Labels) |
Did you change the file? If so, how?
To fill Labels value in matadata.csv
Before:
labelBytes, err := json.Marshal(profile.Labels)
After:
labelBytes, err := json.Marshal(profile.Deployment.Labels)
To make label data more readable:
Before:
err = writer.Write([]string{filename, profile.Name, profile.Deployment.Target, profile.Duration.String(), string(labelBytes)})
After:
err = writer.Write([]string{filename, profile.Name, profile.Deployment.Target, profile.Duration.String(), strings.ReplaceAll(string(labelBytes), `"`, ``)})
Describe the issue
Before: Output results of the metadata.csv
Labels is always null in my environment.
File,Name,ProfileType,Target,Duration,Labels
profiles_1723995611/profile000001.pb.gz,,api,,null
profiles_1723995611/profile000002.pb.gz,,api,,null
profiles_1723995611/profile000003.pb.gz,,api,,null
profiles_1723995611/profile000004.pb.gz,,api,,null
profiles_1723995611/profile000005.pb.gz,,api,,null
After: Output results of the metadata.csv
File,Name,ProfileType,Target,Duration,Labels
profiles_1723998663/profile000001.pb.gz,,api,,"{language:go,version:v1.0.6,zone:asia-northeast1-1}"
profiles_1723998663/profile000002.pb.gz,,api,,"{language:go,version:v1.0.6,zone:asia-northeast1-1}"
profiles_1723998663/profile000003.pb.gz,,api,,"{language:go,version:v1.0.6,zone:asia-northeast1-1}"
profiles_1723998663/profile000004.pb.gz,,api,,"{language:go,version:v1.0.6,zone:asia-northeast1-1}"
profiles_1723998663/profile000005.pb.gz,,api,,"{language:go,version:v1.0.6,zone:asia-northeast1-1}"
how do you think ?
Metadata
Metadata
Assignees
Labels
api: cloudprofilerIssues related to the Cloud Profiler API.Issues related to the Cloud Profiler API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.samplesIssues that are directly related to samples.Issues that are directly related to samples.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.