File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
docs/examples/auto-instrumentation Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- from sys import argv
15
+ import sys
16
16
17
17
from requests import get
18
18
31
31
BatchSpanProcessor (ConsoleSpanExporter ())
32
32
)
33
33
34
-
35
- assert len (argv ) == 2
34
+ # Get parameter from command line argument or use default value "testing"
35
+ param_value = sys . argv [ 1 ] if len (sys . argv ) > 1 else "testing"
36
36
37
37
with tracer .start_as_current_span ("client" ):
38
38
with tracer .start_as_current_span ("client-server" ):
39
39
headers = {}
40
40
inject (headers )
41
41
requested = get (
42
42
"http://localhost:8082/server_request" ,
43
- params = {"param" : argv [ 1 ] },
43
+ params = {"param" : param_value },
44
44
headers = headers ,
45
45
)
46
46
You can’t perform that action at this time.
0 commit comments