Skip to content

Commit

Permalink
inspectIT#1269: Added new properties to TracingSettings (considering …
Browse files Browse the repository at this point in the history
…batch span exporting)
  • Loading branch information
Heiko Holz committed Jan 17, 2022
1 parent 2f408ac commit 0626326
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.concurrent.TimeUnit;

@Data
@NoArgsConstructor
Expand All @@ -16,10 +17,7 @@ public class TracingSettings {
* Enum that defines when are common tags added to span attributes.
*/
public enum AddCommonTags {
NEVER,
ON_GLOBAL_ROOT,
ON_LOCAL_ROOT,
ALWAYS
NEVER, ON_GLOBAL_ROOT, ON_LOCAL_ROOT, ALWAYS
}

/**
Expand Down Expand Up @@ -61,4 +59,17 @@ public enum AddCommonTags {
*/
@NotNull
private PropagationFormat propagationFormat = PropagationFormat.B3;

static final int DEFAULT_MAX_EXPORT_BATCH_SIZE = 512;

/**
* The maximum batch size for every span export. Default value is 512.
*/
private int maxExportBatchSize = DEFAULT_MAX_EXPORT_BATCH_SIZE;

static final long DEFAULT_SCHEDULE_DELAY_MILLIS = 5000;
/**
* Delay interval between two consecutive exports in milliseconds. Default value is 5000ms.
*/
private long scheduleDelayMillis = DEFAULT_SCHEDULE_DELAY_MILLIS;
}
10 changes: 10 additions & 0 deletions inspectit-ocelot-documentation/docs/tracing/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ You can configure the probability with which a trace ends up being collected via
E.g. setting the value to `0.1` will result in only 10% of all traces being collected.
By default, the sample probability is 100%. Note that this global setting only acts as a default value and can be overridden by [individual rules](instrumentation/rules.md#collecting-traces).

### Additional Properties

You can additionally define the following global properties (`inspectit.tracing-property`)

|Property|Default|Description|
|---|---|---|
|`max-export-batch-size`|512|The max export batch size for every export, i.e., the maximum number of spans exported by the used `BatchSpanProcessor`|
|`schedule-delay-millis`|5000|The delay interval between two consecutive exports in milliseconds.
**Note**: These properties take only effect once when the agent is starting. If you change these properties while the agent is running, they will not take effect until the agent retarted.

### Common Tags as Attributes

Globally defined [common tags](metrics/common-tags.md) used when recording metrics can also be inserted as attributes in traces.
Expand Down

0 comments on commit 0626326

Please sign in to comment.