Skip to content

Commit 1095daf

Browse files
committed
don't hash tag values
1 parent de1a365 commit 1095daf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

coderd/telemetry/telemetry.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"context"
66
"crypto/sha256"
7-
"encoding/hex"
87
"encoding/json"
98
"errors"
109
"fmt"
@@ -700,18 +699,17 @@ func ConvertWorkspaceProxy(proxy database.WorkspaceProxy) WorkspaceProxy {
700699
}
701700

702701
func ConvertExternalProvisioner(id uuid.UUID, tags map[string]string, provisioners []database.ProvisionerType) ExternalProvisioner {
703-
hashedTags := make(map[string]string, len(tags))
702+
tagsCopy := make(map[string]string, len(tags))
704703
for k, v := range tags {
705-
hash := sha256.Sum256([]byte(v))
706-
hashedTags[k] = hex.EncodeToString(hash[:])
704+
tagsCopy[k] = v
707705
}
708706
strProvisioners := make([]string, 0, len(provisioners))
709707
for _, prov := range provisioners {
710708
strProvisioners = append(strProvisioners, string(prov))
711709
}
712710
return ExternalProvisioner{
713711
ID: id.String(),
714-
Tags: hashedTags,
712+
Tags: tagsCopy,
715713
Provisioners: strProvisioners,
716714
StartedAt: time.Now(),
717715
}

0 commit comments

Comments
 (0)