prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  KeyError: 'split_by_domain' 
  ```
    File "/Users/viperfx/.pyenv/versions/scrumgenius-env-3.6/lib/python3.6/site-packages/requests/sessions.py", line 581, in post
      return self.request('POST', url, data=data, json=json, **kwargs)
    File "/Users/viperfx/.pyenv/versions/scrumgenius-env-3.6/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
      resp = self.send(prep, **send_kwargs)
    File "/Users/viperfx/.pyenv/versions/scrumgenius-env-3.6/lib/python3.6/site-packages/ddtrace/contrib/requests/connection.py", line 73, in _wrap_send
      span.service = _extract_service_name(instance, span, hostname=hostname)
    File "/Users/viperfx/.pyenv/versions/scrumgenius-env-3.6/lib/python3.6/site-packages/ddtrace/contrib/requests/connection.py", line 30, in _extract_service_name
      if cfg['split_by_domain'] and hostname:
  KeyError: 'split_by_domain'
  ```
  
  Happens on python 3.6 and 3.7
  
  </issue>
  <code>
  [start of ddtrace/contrib/requests/session.py]
  1 import requests
  2 
  3 from ddtrace.vendor.wrapt import wrap_function_wrapper as _w
  4 
  5 from .connection import _wrap_send
  6 
  7 
  8 class TracedSession(requests.Session):
  9     """TracedSession is a requests' Session that is already traced.
  10     You can use it if you want a finer grained control for your
  11     HTTP clients.
  12     """
  13 
  14     pass
  15 
  16 
  17 # always patch our `TracedSession` when imported
  18 _w(TracedSession, "send", _wrap_send)
  19
  [end of ddtrace/contrib/requests/session.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/ddtrace/contrib/requests/session.py b/ddtrace/contrib/requests/session.py
  --- a/ddtrace/contrib/requests/session.py
  +++ b/ddtrace/contrib/requests/session.py
  @@ -2,6 +2,8 @@
   
   from ddtrace.vendor.wrapt import wrap_function_wrapper as _w
   
  +from ddtrace import config, Pin
  +
   from .connection import _wrap_send
   
   
  @@ -16,3 +18,4 @@
   
   # always patch our `TracedSession` when imported
   _w(TracedSession, "send", _wrap_send)
  +Pin(_config=config.requests).onto(TracedSession)
  
verification_info: {"golden_diff": "diff --git a/ddtrace/contrib/requests/session.py b/ddtrace/contrib/requests/session.py\n--- a/ddtrace/contrib/requests/session.py\n+++ b/ddtrace/contrib/requests/session.py\n@@ -2,6 +2,8 @@\n \n from ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n \n+from ddtrace import config, Pin\n+\n from .connection import _wrap_send\n \n \n@@ -16,3 +18,4 @@\n \n # always patch our `TracedSession` when imported\n _w(TracedSession, \"send\", _wrap_send)\n+Pin(_config=config.requests).onto(TracedSession)\n", "issue": "KeyError: 'split_by_domain' \n```\r\n  File \"/Users/viperfx/.pyenv/versions/scrumgenius-env-3.6/lib/python3.6/site-packages/requests/sessions.py\", line 581, in post\r\n    return self.request('POST', url, data=data, json=json, **kwargs)\r\n  File \"/Users/viperfx/.pyenv/versions/scrumgenius-env-3.6/lib/python3.6/site-packages/requests/sessions.py\", line 533, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/Users/viperfx/.pyenv/versions/scrumgenius-env-3.6/lib/python3.6/site-packages/ddtrace/contrib/requests/connection.py\", line 73, in _wrap_send\r\n    span.service = _extract_service_name(instance, span, hostname=hostname)\r\n  File \"/Users/viperfx/.pyenv/versions/scrumgenius-env-3.6/lib/python3.6/site-packages/ddtrace/contrib/requests/connection.py\", line 30, in _extract_service_name\r\n    if cfg['split_by_domain'] and hostname:\r\nKeyError: 'split_by_domain'\r\n```\r\n\r\nHappens on python 3.6 and 3.7\n", "before_files": [{"content": "import requests\n\nfrom ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n\nfrom .connection import _wrap_send\n\n\nclass TracedSession(requests.Session):\n    \"\"\"TracedSession is a requests' Session that is already traced.\n    You can use it if you want a finer grained control for your\n    HTTP clients.\n    \"\"\"\n\n    pass\n\n\n# always patch our `TracedSession` when imported\n_w(TracedSession, \"send\", _wrap_send)\n", "path": "ddtrace/contrib/requests/session.py"}]}