filters

package
v0.2.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(fs ...otel_http.Filter) otel_http.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 ...otel_http.Filter) otel_http.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) otel_http.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) otel_http.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) otel_http.Filter

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

func Method

func Method(m string) otel_http.Filter

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

func None

func None(fs ...otel_http.Filter) otel_http.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

Not provides a convenience mechanism for inverting a Filter

func Path

func Path(p string) otel_http.Filter

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

func PathPrefix

func PathPrefix(p string) otel_http.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) otel_http.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) otel_http.Filter

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL