init_tracer

Function init_tracer 

Source
pub fn init_tracer(
    py: Python<'_>,
    service_name: String,
    transport_config: Option<&Bound<'_, PyAny>>,
    exporter: Option<&Bound<'_, PyAny>>,
    batch_config: Option<Py<BatchConfig>>,
    space: Option<String>,
    name: Option<String>,
    version: Option<String>,
) -> Result<(), TraceError>
Expand description

Global initialization function for the tracer. This sets up the tracer provider with the specified service name, endpoint, and sampling ratio. If no endpoint is provided, spans will be exported to stdout for debugging purposes.

§Arguments

  • service_name - Optional service name for the tracer. Defaults to “scouter_service
  • transport_config - Optional transport configuration for the Scouter exporter
  • exporter - Optional span exporter to use instead of the default HTTP exporter
  • batch_config - Optional batch configuration for span exporting
  • space - Optional space name for Scouter
  • name - Optional name for Scouter
  • version - Optional version for Scouter