Documentation ¶
Overview ¶
Package obfuscate implements quantizing and obfuscating of tags and resources for a set of spans matching a certain criteria.
Index ¶
Constants ¶
const ( EOFChar = 0x100 LexError = 57346 ID = 57347 Limit = 57348 Null = 57349 String = 57350 Number = 57351 BooleanLiteral = 57352 ValueArg = 57353 ListArg = 57354 Comment = 57355 Variable = 57356 Savepoint = 57357 PreparedStatement = 57358 EscapeSequence = 57359 NullSafeEqual = 57360 LE = 57361 GE = 57362 NE = 57363 As = 57365 // Filtered specifies that the given token has been discarded by one of the // token filters. Filtered = 57364 // FilteredComma specifies that the token is a comma and was discarded by one // of the filters. FilteredComma = 57366 // FilteredBracketedIdentifier specifies that we are currently discarding // a bracketed identifier (MSSQL). // See issue https://github.com/DataDog/datadog-trace-agent/issues/475. FilteredBracketedIdentifier = 57367 )
list of available tokens; this list has been reduced because we don't need a full-fledged tokenizer to implement a Lexer
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Obfuscator ¶
type Obfuscator struct {
// contains filtered or unexported fields
}
Obfuscator quantizes and obfuscates spans. The obfuscator is not safe for concurrent use.
func NewObfuscator ¶
func NewObfuscator(cfg *config.ObfuscationConfig) *Obfuscator
NewObfuscator creates a new Obfuscator.
func (*Obfuscator) Obfuscate ¶
func (o *Obfuscator) Obfuscate(span *pb.Span)
Obfuscate may obfuscate span's properties based on its type and on the Obfuscator's configuration.
type SyntaxError ¶
type SyntaxError struct { Offset int64 // error occurred after reading Offset bytes // contains filtered or unexported fields }
A SyntaxError is a description of a JSON syntax error.
func (*SyntaxError) Error ¶
func (e *SyntaxError) Error() string
type Tokenizer ¶
type Tokenizer struct { InStream *strings.Reader Position int // contains filtered or unexported fields }
Tokenizer is the struct used to generate SQL tokens for the parser.
func NewStringTokenizer ¶
NewStringTokenizer creates a new Tokenizer for the sql string.