ext

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package ext contains a set of Datadog-specific constants. Most of them are used for setting span metadata.

Index

Constants

View Source
const (
	// DEPRECATED: Use SpanTypeWeb
	// AppTypeWeb specifies the Web span type and can be used as a tag value
	// for a span's SpanType tag.
	AppTypeWeb = "web"

	// AppTypeDB specifies the DB span type and can be used as a tag value
	// for a span's SpanType tag. If possible, use one of the SpanType*
	// constants for a more accurate indication.
	AppTypeDB = "db"

	// AppTypeCache specifies the Cache span type and can be used as a tag value
	// for a span's SpanType tag. If possible, consider using SpanTypeRedis or
	// SpanTypeMemcached.
	AppTypeCache = "cache"

	// AppTypeRPC specifies the RPC span type and can be used as a tag value
	// for a span's SpanType tag.
	AppTypeRPC = "rpc"
)

App types determine how to categorize a trace in the Datadog application. For more fine-grained behaviour, use the SpanType* constants.

View Source
const (
	// SpanTypeWeb marks a span as an HTTP server request.
	SpanTypeWeb = "web"

	// SpanTypeHTTP marks a span as an HTTP client request.
	SpanTypeHTTP = "http"

	// SpanTypeSQL marks a span as an SQL operation. These spans may
	// have an "sql.command" tag.
	SpanTypeSQL = "sql"

	// SpanTypeCassandra marks a span as a Cassandra operation. These
	// spans may have an "sql.command" tag.
	SpanTypeCassandra = "cassandra"

	// SpanTypeRedis marks a span as a Redis operation. These spans may
	// also have a "redis.raw_command" tag.
	SpanTypeRedis = "redis"

	// SpanTypeMemcached marks a span as a memcached operation.
	SpanTypeMemcached = "memcached"

	// SpanTypeMongoDB marks a span as a MongoDB operation.
	SpanTypeMongoDB = "mongodb"

	// SpanTypeElasticSearch marks a span as an ElasticSearch operation.
	// These spans may also have an "elasticsearch.body" tag.
	SpanTypeElasticSearch = "elasticsearch"
)

Span types have similar behaviour to "app types" and help categorize traces in the Datadog application. They can also help fine grain agent level bahviours such as obfuscation and quantization, when these are enabled in the agent's configuration.

View Source
const (
	// CassandraQuery is the tag name used for cassandra queries.
	CassandraQuery = "cassandra.query"

	// CassandraConsistencyLevel is the tag name to set for consitency level.
	CassandraConsistencyLevel = "cassandra.consistency_level"

	// CassandraCluster specifies the tag name that is used to set the cluster.
	CassandraCluster = "cassandra.cluster"

	// CassandraRowCount specifies the tag name to use when settings the row count.
	CassandraRowCount = "cassandra.row_count"

	// CassandraKeyspace is used as tag name for setting the key space.
	CassandraKeyspace = "cassandra.keyspace"

	// CassandraPaginated specifies the tag name for paginated queries.
	CassandraPaginated = "cassandra.paginated"
)
View Source
const (
	// PriorityUserReject informs the backend that a trace should be rejected and not stored.
	// This should be used by user code overriding default priority.
	PriorityUserReject = -1

	// PriorityAutoReject informs the backend that a trace should be rejected and not stored.
	// This is used by the builtin sampler.
	PriorityAutoReject = 0

	// PriorityAutoKeep informs the backend that a trace should be kept and not stored.
	// This is used by the builtin sampler.
	PriorityAutoKeep = 1

	// PriorityUserKeep informs the backend that a trace should be kept and not stored.
	// This should be used by user code overriding default priority.
	PriorityUserKeep = 2
)
View Source
const (
	// TargetHost sets the target host address.
	TargetHost = "out.host"

	// TargetPort sets the target host port.
	TargetPort = "out.port"

	// SamplingPriority is the tag that marks the sampling priority of a span.
	SamplingPriority = "sampling.priority"

	// SQLType sets the sql type tag.
	SQLType = "sql"

	// SQLQuery sets the sql query tag on a span.
	SQLQuery = "sql.query"

	// HTTPMethod specifies the HTTP method used in a span.
	HTTPMethod = "http.method"

	// HTTPCode sets the HTTP status code as a tag.
	HTTPCode = "http.status_code"

	// HTTPURL sets the HTTP URL for a span.
	HTTPURL = "http.url"

	// SpanType defines the Span type (web, db, cache).
	SpanType = "span.type"

	// ServiceName defines the Service name for this Span.
	ServiceName = "service.name"

	// ResourceName defines the Resource name for the Span.
	ResourceName = "resource.name"

	// Error specifies the error tag. It's value is usually of type "error".
	Error = "error"

	// ErrorMsg specifies the error message.
	ErrorMsg = "error.msg"

	// ErrorType specifies the error type.
	ErrorType = "error.type"

	// ErrorStack specifies the stack dump.
	ErrorStack = "error.stack"

	// Environment specifies the environment to use with a trace.
	Environment = "env"

	// DBApplication indicates the application using the database.
	DBApplication = "db.application"
	// DBName indicates the database name.
	DBName = "db.name"
	// DBUser indicates the user name of Database, e.g. "readonly_user" or "reporting_user".
	DBUser = "db.user"
)
View Source
const (
	// The pid of the traced process
	Pid = "system.pid"
)

Standard system metadata names

Variables

This section is empty.

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