Skip to content

Commit

Permalink
fix: otel configuration (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag authored Dec 9, 2024
1 parent bf3c12c commit 5814540
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deployments/pulumi/pkg/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,18 @@ func NewComponent(ctx *pulumi.Context, name string, args *ComponentArgs, opts ..
if otel.ResourceAttributes != nil {
envVars = append(envVars, corev1.EnvVarArgs{
Name: pulumi.String("OTEL_RESOURCE_ATTRIBUTES"),
Value: pulumi.All(otel.ResourceAttributes).ApplyT(func(v []map[string]string) string {
Value: pulumix.Apply(otel.ResourceAttributes, func(rawResourceAttributes map[string]string) string {
ret := ""
keys := collectionutils.Keys(v[0])
keys := collectionutils.Keys(rawResourceAttributes)
slices.Sort(keys)
for _, key := range keys {
ret += key + "=" + v[0][key] + ","
ret += key + "=" + rawResourceAttributes[key] + ","
}
if len(ret) > 0 {
ret = ret[:len(ret)-1]
}
return ret
}).(pulumi.StringOutput),
}).Untyped().(pulumi.StringOutput),
})
}
if traces := args.Otel.Traces; traces != nil {
Expand Down

0 comments on commit 5814540

Please sign in to comment.