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 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- from sys import argv
15+ import sys
1616
1717from requests import get
1818
3131 BatchSpanProcessor (ConsoleSpanExporter ())
3232)
3333
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"
3636
3737with tracer .start_as_current_span ("client" ):
3838 with tracer .start_as_current_span ("client-server" ):
3939 headers = {}
4040 inject (headers )
4141 requested = get (
4242 "http://localhost:8082/server_request" ,
43- params = {"param" : argv [ 1 ] },
43+ params = {"param" : param_value },
4444 headers = headers ,
4545 )
4646
You can’t perform that action at this time.
0 commit comments