feat: new helpers and masking/encrypting attributes
New helper functions were added to make call-site less likely to need to pull `go.opentelemetry.io/otel/attribute` as a dependency. Additionally `Encrypted` and `Masked` were added to add a possibility of logging sensitive data in a more secure manner.
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
"os/signal"
|
||||
"time"
|
||||
|
||||
"git.ma-al.com/maal-libraries/observer/pkg/attr"
|
||||
"git.ma-al.com/maal-libraries/observer/pkg/attr/layer_attr"
|
||||
"git.ma-al.com/maal-libraries/observer/pkg/event"
|
||||
"git.ma-al.com/maal-libraries/observer/pkg/exporters"
|
||||
@ -111,6 +112,11 @@ func Serv(ctx context.Context) *fiber.Error {
|
||||
return fiber.NewError(500, "xd")
|
||||
}
|
||||
|
||||
span.SetAttributes(
|
||||
attr.Masked("some_masked_value", "some_masked_value"),
|
||||
attr.Encrypted("some_encrypted_value", "some_encrypted_value"),
|
||||
)
|
||||
|
||||
return fiber.NewError(500, "x")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user