Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 711 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 711 Bytes

Go Agent Filter

Filtering capability as specified in Hypertrace filter specification can be added to instrumentations.

Example

// Filter requests containing "foo" in URL
type FooURLFilter struct {
}

// Filter evaluates whether request should be blocked, `true` blocks the request and `false` continues it.
func (FooURLFilter) EvaluateURLAndHeaders(span sdk.Span, url string, headers map[string][]string) bool {
	return false
}

// Filter evaluates whether request should be blocked, `true` blocks the request and `false` continues it.
func (FooURLFilter) EvaluateBody(span sdk.Span, body []byte) bool {
	return false
}