package filters

import "go.opentelemetry.io/otel/plugin/othttp/filters"

Package filters provides a set of filters useful with the othttp.WithFilter() option to control which inbound requests are traced.

Index

Functions

func All

func All(fs ...othttp.Filter) othttp.Filter

All takes a list of Filters and returns a Filter that returns true only if all Filters in the list return true.

func Any

func Any(fs ...othttp.Filter) othttp.Filter

Any takes a list of Filters and returns a Filter that returns true if any Filter in the list returns true.

func Header(k, v string) othttp.Filter

Header returns a Filter that returns true if the request includes a header k with a value equal to v.

func HeaderContains

func HeaderContains(k, v string) othttp.Filter

HeaderContains returns a Filter that returns true if the request includes a header k with a value that contains v.

func Hostname

func Hostname(h string) othttp.Filter

Hostname returns a Filter that returns true if the request's hostname matches the provided string.

func Method

func Method(m string) othttp.Filter

Method returns a Filter that returns true if the request method is equal to the provided value.

func None

func None(fs ...othttp.Filter) othttp.Filter

None takes a list of Filters and returns a Filter that returns true only if none of the Filters in the list return true.

func Not

func Not(f othttp.Filter) othttp.Filter

Not provides a convenience mechanism for inverting a Filter

func Path

func Path(p string) othttp.Filter

Path returns a Filter that returns true if the request's path matches the provided string.

func PathPrefix

func PathPrefix(p string) othttp.Filter

PathPrefix returns a Filter that returns true if the request's path starts with the provided string.

func Query

func Query(k, v string) othttp.Filter

Query returns a Filter that returns true if the request includes a query parameter k with a value equal to v.

func QueryContains

func QueryContains(k, v string) othttp.Filter

QueryContains returns a Filter that returns true if the request includes a query parameter k with a value that contains v.

Source Files

filters.go header_go14.go

Version
v0.5.0
Published
May 14, 2020
Platform
js/wasm
Imports
3 packages
Last checked
51 minutes ago

Tools for package owners.