Skip to content

Commit

Permalink
Updated config values
Browse files Browse the repository at this point in the history
  • Loading branch information
gechetspr committed Jan 21, 2025
1 parent eb6a3f8 commit 168e060
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class OpentelemetryInstrumentationConfig
*/
public static function getSamplerThresholdNano(): int
{
$multiplicator = getenv(static::OTEL_BSP_MIN_SPAN_DURATION_THRESHOLD) ?: 5;
$multiplicator = getenv(static::OTEL_BSP_MIN_SPAN_DURATION_THRESHOLD) ?: 20;

return $multiplicator * 1000000;
}
Expand All @@ -104,7 +104,7 @@ public static function getSamplerThresholdNano(): int
*/
public static function getSamplerThresholdNanoForCriticalSpan(): int
{
$multiplicator = getenv(static::OTEL_BSP_MIN_CRITICAL_SPAN_DURATION_THRESHOLD) ?: 0;
$multiplicator = getenv(static::OTEL_BSP_MIN_CRITICAL_SPAN_DURATION_THRESHOLD) ?: 10;

return $multiplicator * 1000000;
}
Expand Down Expand Up @@ -183,7 +183,7 @@ public static function getDefaultServiceName(): string
*/
public static function getSamplerProbability(): float
{
$probability = getenv(static::OTEL_TRACES_SAMPLER_ARG) ?: 0.3;
$probability = getenv(static::OTEL_TRACES_SAMPLER_ARG) ?: 0.1;

return (float)$probability;
}
Expand All @@ -195,7 +195,7 @@ public static function getSamplerProbability(): float
*/
public static function getSamplerProbabilityForCriticalSpans(): float
{
$probability = getenv(static::OTEL_TRACES_CRITICAL_SAMPLER_ARG) ?: 1;
$probability = getenv(static::OTEL_TRACES_CRITICAL_SAMPLER_ARG) ?: 0.5;

return (float)$probability;
}
Expand Down

0 comments on commit 168e060

Please sign in to comment.