@@ -4,20 +4,38 @@ Global configuration of the trace service. This allows users to change configs f
44sampler, maximum events to be kept, etc.
55
66## TraceParams
7- Represents the set of parameters that users can control
7+ Represents the set of parameters that users can control
88* Default ` Sampler ` - used when creating a Span if no specific sampler is given. The default sampler
99is a [ Probability] ( Sampling.md ) sampler with the probability set to ` 1/10000 ` .
10- * Default max number of ` Attribute ` s per ` Span ` - used when creating a Span if no specific limit on
11- ` Attribute ` s is given. The default limit is 32.
12- * Default max number of ` Annotation ` s per ` Span ` - used when creating a Span if no specific limit on
13- ` Annotation ` s is given. The default limit is 32.
14- * Default max number of ` Message Event ` s per ` Span ` - used when creating a Span if no specific limit
15- on ` Message Event ` s is given. The default limit is 128.
16- * Default max number of ` Link ` s per ` Span ` - used when creating a Span if no specific limit on
17- ` Link ` s is given. The default limit is 32.
10+
11+ ### Limits
12+
13+ We define limits on the number of attributes, annotations, message events and links on each span
14+ in order to prevent unbounded memory increase for long-running spans.
15+
16+ When limits are exceeded, implementations should by default preserve the most recently added values
17+ and drop the oldest values. Implementations may make this policy configurable.
18+
19+ Implementations should track the number of dropped items per span. Some backends provide dedicated
20+ support for tracking these counts. Others do not, but exporters may choose to represent these in
21+ exported spans in some way (for example, as a tag).
22+
23+ Implementations may support tracking the total number of dropped items in stats as outlined.
24+
25+ | Item | Default Limit | Measure for dropped items |
26+ | --- | --- | --- |
27+ | Attributes | 32 | opencensus.io/trace/dropped_attributes |
28+ | Annotations | 32 | opencensus.io/trace/dropped_annotations |
29+ | Message Events | 128 | opencensus.io/trace/dropped_message_events |
30+ | Links | 32 | opencensus.io/trace/dropped_links |
31+
32+ No views should be registered by default on these measures. Users may register views if they
33+ are interested in recording these measures.
34+
35+ Implementations should provide a way to override the globals per-span.
1836
1937## API Summary
2038* Permanently update the active TraceParams.
21- * Temporary update the active TraceParams. This API allows changing of the active params for a
39+ * Temporary update the active TraceParams. This API allows changing of the active params for a
2240certain period of time. No more than one active temporary update can exist at any moment.
2341* Get current active TraceParams.
0 commit comments