1
0
Fork 0

Added integration support for DataDog APM Tracing

This commit is contained in:
Alex Antonov 2018-06-28 11:40:04 -05:00 committed by Traefiker Bot
parent ba8c9295ac
commit 3192307d59
61 changed files with 9999 additions and 5 deletions

View file

@ -0,0 +1,19 @@
package ext // import "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext"
const (
// 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.
AppTypeDB = "db"
// AppTypeCache specifies the Cache span type and can be used as a tag value
// for a span's SpanType tag.
AppTypeCache = "cache"
// AppTypeRPC specifies the RPC span type and can be used as a tag value
// for a span's SpanType tag.
AppTypeRPC = "rpc"
)

View file

@ -0,0 +1,21 @@
package ext
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 file

@ -0,0 +1,22 @@
package ext
// Priority is a hint given to the backend so that it knows which traces to reject or kept.
// In a distributed context, it should be set before any context propagation (fork, RPC calls) to be effective.
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 file

@ -0,0 +1,7 @@
package ext
// Standard system metadata names
const (
// The pid of the traced process
Pid = "system.pid"
)

View file

@ -0,0 +1,50 @@
// Package ext contains a set of Datadog-specific constants. Most of them are used
// for setting span metadata.
package ext
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"
)