Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anonymizer ¶
type Anonymizer struct {
// contains filtered or unexported fields
}
Anonymizer transforms Jaeger span in the domain model by obfuscating site-specific strings, like service and operation names, and removes custom tags. It returns obfuscated span in the Jaeger UI format, to make it easy to visualize traces.
The mapping from original to obfuscated strings is stored in a file and can be reused between runs.
func New ¶
func New(mappingFile string, options Options, logger *zap.Logger) *Anonymizer
New creates new Anonymizer. The mappingFile stores the mapping from original to obfuscated strings, in case later investigations require looking at the original traces.
func (*Anonymizer) AnonymizeSpan ¶
func (a *Anonymizer) AnonymizeSpan(span *model.Span) *uimodel.Span
AnonymizeSpan obfuscates and converts the span.
func (*Anonymizer) SaveMapping ¶
func (a *Anonymizer) SaveMapping()
SaveMapping writes the mapping from original to obfuscated strings to a file. It is called by the anonymizer itself periodically, and should be called at the end of the extraction run.
type Options ¶ added in v1.21.0
type Options struct { HashStandardTags bool `yaml:"hash_standard_tags" name:"hash_standard_tags"` HashCustomTags bool `yaml:"hash_custom_tags" name:"hash_custom_tags"` HashLogs bool `yaml:"hash_logs" name:"hash_logs"` HashProcess bool `yaml:"hash_process" name:"hash_process"` }
Options represents the various options with which the anonymizer can be configured.