Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Trace distributed systems by using OpenTelemetry SDKs

A worked example

Multiple answers

A Python RAG service uses the Azure Monitor OpenTelemetry Distro and calls configure_azure_monitor() without any sampling arguments. The deployed application code cannot be modified. You can update environment variables and restart the service. You must meet the following requirements:

  • Keep a fixed fraction of approximately 5% of all traces.
  • The operations team must be able to change the sampling rate later without changing or redeploying the application code.

Which two actions should you perform before the service initializes the Distro? Each correct answer presents part of the solution.

Choose 2 answers.
Why

Fixed-percentage sampling retains a configured proportion of traces, whereas rate-limited sampling limits traces per second. Set OTEL_TRACES_SAMPLER to microsoft.fixed_percentage and OTEL_TRACES_SAMPLER_ARG to 0.05 before initialization to retain approximately 5%. These external settings let the operations team adjust sampling without editing the application code.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free