Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
event: corrected package level doc
Browse files Browse the repository at this point in the history
  • Loading branch information
gbbr committed Oct 29, 2018
1 parent 50bcec9 commit 66cd02a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
32 changes: 15 additions & 17 deletions event/doc.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
/*
Package event contains functionality related to APM event extraction from traces.
APM Events constitute the core of Datadog's Trace Search functionality. These are, in a nutshell, individual spans
containing important information (but not full trace tree) about an execution and which can therefore be sampled at a
different rate (retaining greater cardinality than that of complete traces). Furthermore, all information in APM events
can be indexed, allowing for very flexible searching.
For instance, consider a web server. The top-level span on traces from this web server likely contains interesting
things such as customer/user id, IPs, HTTP tags, HTTP endpoint, among others. By extracting this top level span from
each trace, converting it into an APM event and feeding it into trace search, you can potentially search and aggregate
this information for all requests arriving at your web server. You couldn't do the same thing with traces because these
capture entire execution trees which are much more expensive to process and store and are therefore heavily sampled.
Of course, if the trace from which APM events were extracted also survives sampling, you can easily see the execution
tree associated with a particular APM event as this link is kept throughout the entire processing pipeline.
*/
// Package event contains functionality related to APM event extraction from traces.
//
// APM Events constitute the core of Datadog's Trace Search functionality. These are, in a nutshell, individual spans
// containing important information (but not full trace tree) about an execution and which can therefore be sampled at a
// different rate (retaining greater cardinality than that of complete traces). Furthermore, all information in APM events
// can be indexed, allowing for very flexible searching.
//
// For instance, consider a web server. The top-level span on traces from this web server likely contains interesting
// things such as customer/user id, IPs, HTTP tags, HTTP endpoint, among others. By extracting this top level span from
// each trace, converting it into an APM event and feeding it into trace search, you can potentially search and aggregate
// this information for all requests arriving at your web server. You couldn't do the same thing with traces because these
// capture entire execution trees which are much more expensive to process and store and are therefore heavily sampled.
//
// Of course, if the trace from which APM events were extracted also survives sampling, you can easily see the execution
// tree associated with a particular APM event as this link is kept throughout the entire processing pipeline.
package event
2 changes: 1 addition & 1 deletion writer/trace_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
const pathTraces = "/api/v0.2/traces"

// TracePackage represents the result of a trace sampling operation.

//
// NOTE: A TracePackage can be valid even if any of its fields is nil/empty. In particular, a common case is that of
// empty Trace but non-empty Events. This happens when events are extracted from a trace that wasn't sampled.
type TracePackage struct {
Expand Down

0 comments on commit 66cd02a

Please sign in to comment.