Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/examples/auto-instrumentation/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from sys import argv
import sys

from requests import get

Expand All @@ -31,16 +31,16 @@
BatchSpanProcessor(ConsoleSpanExporter())
)


assert len(argv) == 2
# Get parameter from command line argument or use default value "testing"
param_value = sys.argv[1] if len(sys.argv) > 1 else "testing"

with tracer.start_as_current_span("client"):
with tracer.start_as_current_span("client-server"):
headers = {}
inject(headers)
requested = get(
"http://localhost:8082/server_request",
params={"param": argv[1]},
params={"param": param_value},
headers=headers,
)

Expand Down
Loading