PayloadChunking.EstimateActivityBytes(Activity) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Heuristic estimator for the serialized size of an OTLP span produced from the supplied Activity when emitted as OTLP/HTTP JSON.
Uses generous constants tuned to over-estimate by ~25-50%, providing headroom for JSON serializer variance (whitespace, enum representation, integer-as-string).
public static long EstimateActivityBytes(System.Diagnostics.Activity activity);
static member EstimateActivityBytes : System.Diagnostics.Activity -> int64
Public Shared Function EstimateActivityBytes (activity As Activity) As Long
Parameters
- activity
- Activity
The activity to estimate.
Returns
An over-estimate of the serialized OTLP span size in bytes.