ext

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SpanKindKey is the SpanKind tag key
	SpanKindKey = "span.kind"

	// SpanKindClientValue is the SpanKindClient tag value
	SpanKindClientValue = "client"

	// SpanKindServerValue is the SpanKindServer tag value
	SpanKindServerValue = "server"

	// ComponentKey is the tag key for a low-cardinality identifier of the module,
	// library, or package that is generating a span.
	ComponentKey = "component"

	// DbInstanceKey is the tag key for a Database instance name. E.g., In java, if the
	// jdbc.url="jdbc:mysql://127.0.0.1:3306/customers", the instance name is "customers".
	DbInstanceKey = "db.instance"

	// DbStatementKey is the tag key for a database statement for the given database
	// type. E.g., for db.type="SQL", "SELECT * FROM wuser_table"; for db.type="redis",
	// "SET mykey 'WuValue'".
	DbStatementKey = "db.statement"

	// DbTypeKey is the tag key for a Database type. For any SQL database, "sql". For others,
	// the lower-case database category, e.g. "cassandra", "hbase", or "redis".
	DbTypeKey = "db.type"

	// DbUserKey is the tag key for a Username for accessing database. E.g.,
	// "readonly_user" or "reporting_user"
	DbUserKey = "db.user"

	// PeerServiceKey is the key for a tag that records the service name of the peer
	PeerServiceKey = "peer.service"

	// PeerHostnameKey is the key for a tag that records the host name of the peer
	PeerHostnameKey = "peer.hostname"

	// PeerHostIPv4Key is the key for a tag that records IP v4 host address of the peer
	PeerHostIPv4Key = "peer.ipv4"

	// PeerHostIPv6Key is the key for a tag that records IP v6 host address of the peer
	PeerHostIPv6Key = "peer.ipv6"

	// PeerPortKey is the key for a tag that records port number of the peer
	PeerPortKey = "peer.port"

	// HTTPUrlKey is the key for a tag that should be the URL of the request being
	// handled in this segment of the trace, in standard URI format. The protocol
	// is optional.
	HTTPUrlKey = "http.url"

	// HTTPMethodKey is the key for a tag that is the HTTP method of the request,
	// and is case-insensitive.
	HTTPMethodKey = "http.method"

	// HTTPStatusCodeKey is the numeric HTTP status code (200, 404, etc) of the
	// HTTP response.
	HTTPStatusCodeKey = "http.status_code"

	// ErrorKey is the key for a tag that indicates that operation represented by
	// the span resulted in an error.
	ErrorKey = "error"

	// HTTPRemoteAddrKey is the key for a tag that reprents the X-Forwarded-For
	// header or Client IP of the caller
	HTTPRemoteAddrKey = "http.remote_addr"

	// HTTPUserAgentKey is the key for the UserAgent tag
	HTTPUserAgentKey = "http.user_agent"
)

Tag keys (and values) for standard and recommended tags a given here. This is to supplement and improve on the [Standard Tags](https://github.com/opentracing/opentracing-go/blob/master/ext/tags.go)

Variables

View Source
var (
	// SpanKindClient hints at client relationship between spans
	SpanKindClient = spanKindTag(SpanKindKey, SpanKindClientValue)

	// SpanKindServer hints at server relationship between spans
	SpanKindServer = spanKindTag(SpanKindKey, SpanKindServerValue)

	// Component is a low-cardinality identifier of the module, library,
	// or package that is generating a span.
	Component = stringTagName(ComponentKey)

	// DbInstance is the tag for a Database instance name. E.g., In java, if the
	// jdbc.url="jdbc:mysql://127.0.0.1:3306/customers", the instance name is "customers".
	DbInstance = stringTagName(DbInstanceKey)

	// DbStatement is the tag for a database statement for the given database
	// type. E.g., for db.type="SQL", "SELECT * FROM wuser_table"; for db.type="redis",
	// "SET mykey 'WuValue'".
	DbStatement = stringTagName(DbStatementKey)

	// DbType is the tag for a Database type. For any SQL database, "sql". For others,
	// the lower-case database category, e.g. "cassandra", "hbase", or "redis".
	DbType = stringTagName(DbTypeKey)

	// DbUser is the tag for a Username for accessing database. E.g.,
	// "readonly_user" or "reporting_user"
	DbUser = stringTagName(DbUserKey)

	// PeerService records the service name of the peer
	PeerService = stringTagName(PeerServiceKey)

	// PeerHostname records the host name of the peer
	PeerHostname = stringTagName(PeerHostnameKey)

	// PeerHostIPv4 records IP v4 host address of the peer
	PeerHostIPv4 = uint32TagName(PeerHostIPv4Key)

	// PeerHostIPv6 records IP v6 host address of the peer
	PeerHostIPv6 = stringTagName(PeerHostIPv6Key)

	// PeerPort records port number of the peer
	PeerPort = uint16TagName(PeerPortKey)

	// HTTPUrl should be the URL of the request being handled in this segment
	// of the trace, in standard URI format. The protocol is optional.
	HTTPUrl = stringTagName(HTTPUrlKey)

	// HTTPMethod is the HTTP method of the request, and is case-insensitive.
	HTTPMethod = stringTagName(HTTPMethodKey)

	// HTTPStatusCode is the numeric HTTP status code (200, 404, etc) of the
	// HTTP response.
	HTTPStatusCode = intTagName(HTTPStatusCodeKey)

	// Error indicates that operation represented by the span resulted in an error.
	Error = boolTagName(ErrorKey)

	// HTTPRemoteAddr is the X-Forwarded-For header or Client IP
	HTTPRemoteAddr = stringTagName(HTTPRemoteAddrKey)

	// HTTPUserAgent is the
	HTTPUserAgent = stringTagName(HTTPUserAgentKey)
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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