package env

import "go.opentelemetry.io/otel/sdk/internal/env"

Index

Constants

const (
	// BatchSpanProcessorScheduleDelayKey
	// Delay interval between two consecutive exports.
	// i.e. 5000
	BatchSpanProcessorScheduleDelayKey = "OTEL_BSP_SCHEDULE_DELAY"
	// BatchSpanProcessorExportTimeoutKey
	// Maximum allowed time to export data.
	// i.e. 3000
	BatchSpanProcessorExportTimeoutKey = "OTEL_BSP_EXPORT_TIMEOUT"
	// BatchSpanProcessorMaxQueueSizeKey
	// Maximum queue size
	// i.e. 2048
	BatchSpanProcessorMaxQueueSizeKey = "OTEL_BSP_MAX_QUEUE_SIZE"
	// BatchSpanProcessorMaxExportBatchSizeKey
	// Maximum batch size
	// Note: Must be less than or equal to EnvBatchSpanProcessorMaxQueueSize
	// i.e. 512
	BatchSpanProcessorMaxExportBatchSizeKey = "OTEL_BSP_MAX_EXPORT_BATCH_SIZE"
)

Environment variable names

Functions

func BatchSpanProcessorExportTimeout

func BatchSpanProcessorExportTimeout(defaultValue int) int

BatchSpanProcessorExportTimeout returns the environment variable value for the OTEL_BSP_EXPORT_TIMEOUT key if it exists, otherwise defaultValue is returned.

func BatchSpanProcessorMaxExportBatchSize

func BatchSpanProcessorMaxExportBatchSize(defaultValue int) int

BatchSpanProcessorMaxExportBatchSize returns the environment variable value for the OTEL_BSP_MAX_EXPORT_BATCH_SIZE key if it exists, otherwise defaultValue is returned.

func BatchSpanProcessorMaxQueueSize

func BatchSpanProcessorMaxQueueSize(defaultValue int) int

BatchSpanProcessorMaxQueueSize returns the environment variable value for the OTEL_BSP_MAX_QUEUE_SIZE key if it exists, otherwise defaultValue is returned.

func BatchSpanProcessorScheduleDelay

func BatchSpanProcessorScheduleDelay(defaultValue int) int

BatchSpanProcessorScheduleDelay returns the environment variable value for the OTEL_BSP_SCHEDULE_DELAY key if it exists, otherwise defaultValue is returned.

func IntEnvOr

func IntEnvOr(key string, defaultValue int) int

IntEnvOr returns the int value of the environment variable with name key if it exists and the value is an int. Otherwise, defaultValue is returned.

Source Files

env.go

Version
v1.4.0
Published
Feb 11, 2022
Platform
linux/amd64
Imports
3 packages
Last checked
42 minutes ago

Tools for package owners.