prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Move getting started guide to opentelemetry.io
  For GA there is an ask to add at least all getting started documentation to the opentelemetry.io website -- for Python this is tracked in: https://github.com/open-telemetry/opentelemetry.io/issues/285. Maintaining the documentation in two places is not ideal so proposal is to move getting started documentation. A similar activity already happened for Java.
  
  </issue>
  <code>
  [start of docs/getting_started/otlpcollector_example.py]
  1 # Copyright The OpenTelemetry Authors
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 # otcollector.py
  16 import time
  17 
  18 from opentelemetry import trace
  19 from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
  20     OTLPSpanExporter,
  21 )
  22 from opentelemetry.sdk.trace import TracerProvider
  23 from opentelemetry.sdk.trace.export import BatchSpanProcessor
  24 
  25 span_exporter = OTLPSpanExporter(
  26     # optional
  27     # endpoint:="myCollectorURL:55678",
  28     # credentials=ChannelCredentials(credentials),
  29     # headers=(("metadata", "metadata")),
  30 )
  31 tracer_provider = TracerProvider()
  32 trace.set_tracer_provider(tracer_provider)
  33 span_processor = BatchSpanProcessor(span_exporter)
  34 tracer_provider.add_span_processor(span_processor)
  35 
  36 # Configure the tracer to use the collector exporter
  37 tracer = trace.get_tracer_provider().get_tracer(__name__)
  38 
  39 with tracer.start_as_current_span("foo"):
  40     print("Hello world!")
  41
  [end of docs/getting_started/otlpcollector_example.py]
  [start of docs/getting_started/tracing_example.py]
  1 # Copyright The OpenTelemetry Authors
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 # tracing.py
  16 from opentelemetry import trace
  17 from opentelemetry.sdk.trace import TracerProvider
  18 from opentelemetry.sdk.trace.export import (
  19     ConsoleSpanExporter,
  20     SimpleSpanProcessor,
  21 )
  22 
  23 trace.set_tracer_provider(TracerProvider())
  24 trace.get_tracer_provider().add_span_processor(
  25     SimpleSpanProcessor(ConsoleSpanExporter())
  26 )
  27 
  28 tracer = trace.get_tracer(__name__)
  29 
  30 with tracer.start_as_current_span("foo"):
  31     with tracer.start_as_current_span("bar"):
  32         with tracer.start_as_current_span("baz"):
  33             print("Hello world from OpenTelemetry Python!")
  34
  [end of docs/getting_started/tracing_example.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/docs/getting_started/otlpcollector_example.py b/docs/getting_started/otlpcollector_example.py
  --- a/docs/getting_started/otlpcollector_example.py
  +++ b/docs/getting_started/otlpcollector_example.py
  @@ -24,7 +24,7 @@
   
   span_exporter = OTLPSpanExporter(
       # optional
  -    # endpoint:="myCollectorURL:55678",
  +    # endpoint:="myCollectorURL:4317",
       # credentials=ChannelCredentials(credentials),
       # headers=(("metadata", "metadata")),
   )
  diff --git a/docs/getting_started/tracing_example.py b/docs/getting_started/tracing_example.py
  --- a/docs/getting_started/tracing_example.py
  +++ b/docs/getting_started/tracing_example.py
  @@ -20,10 +20,11 @@
       SimpleSpanProcessor,
   )
   
  -trace.set_tracer_provider(TracerProvider())
  -trace.get_tracer_provider().add_span_processor(
  -    SimpleSpanProcessor(ConsoleSpanExporter())
  -)
  +provider = TracerProvider()
  +processor = SimpleSpanProcessor(ConsoleSpanExporter())
  +provider.add_span_processor(processor)
  +trace.set_tracer_provider(provider)
  +
   
   tracer = trace.get_tracer(__name__)
  
verification_info: {"golden_diff": "diff --git a/docs/getting_started/otlpcollector_example.py b/docs/getting_started/otlpcollector_example.py\n--- a/docs/getting_started/otlpcollector_example.py\n+++ b/docs/getting_started/otlpcollector_example.py\n@@ -24,7 +24,7 @@\n \n span_exporter = OTLPSpanExporter(\n     # optional\n-    # endpoint:=\"myCollectorURL:55678\",\n+    # endpoint:=\"myCollectorURL:4317\",\n     # credentials=ChannelCredentials(credentials),\n     # headers=((\"metadata\", \"metadata\")),\n )\ndiff --git a/docs/getting_started/tracing_example.py b/docs/getting_started/tracing_example.py\n--- a/docs/getting_started/tracing_example.py\n+++ b/docs/getting_started/tracing_example.py\n@@ -20,10 +20,11 @@\n     SimpleSpanProcessor,\n )\n \n-trace.set_tracer_provider(TracerProvider())\n-trace.get_tracer_provider().add_span_processor(\n-    SimpleSpanProcessor(ConsoleSpanExporter())\n-)\n+provider = TracerProvider()\n+processor = SimpleSpanProcessor(ConsoleSpanExporter())\n+provider.add_span_processor(processor)\n+trace.set_tracer_provider(provider)\n+\n \n tracer = trace.get_tracer(__name__)\n", "issue": "Move getting started guide to opentelemetry.io\nFor GA there is an ask to add at least all getting started documentation to the opentelemetry.io website -- for Python this is tracked in: https://github.com/open-telemetry/opentelemetry.io/issues/285. Maintaining the documentation in two places is not ideal so proposal is to move getting started documentation. A similar activity already happened for Java.\n", "before_files": [{"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# otcollector.py\nimport time\n\nfrom opentelemetry import trace\nfrom opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (\n    OTLPSpanExporter,\n)\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import BatchSpanProcessor\n\nspan_exporter = OTLPSpanExporter(\n    # optional\n    # endpoint:=\"myCollectorURL:55678\",\n    # credentials=ChannelCredentials(credentials),\n    # headers=((\"metadata\", \"metadata\")),\n)\ntracer_provider = TracerProvider()\ntrace.set_tracer_provider(tracer_provider)\nspan_processor = BatchSpanProcessor(span_exporter)\ntracer_provider.add_span_processor(span_processor)\n\n# Configure the tracer to use the collector exporter\ntracer = trace.get_tracer_provider().get_tracer(__name__)\n\nwith tracer.start_as_current_span(\"foo\"):\n    print(\"Hello world!\")\n", "path": "docs/getting_started/otlpcollector_example.py"}, {"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# tracing.py\nfrom opentelemetry import trace\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import (\n    ConsoleSpanExporter,\n    SimpleSpanProcessor,\n)\n\ntrace.set_tracer_provider(TracerProvider())\ntrace.get_tracer_provider().add_span_processor(\n    SimpleSpanProcessor(ConsoleSpanExporter())\n)\n\ntracer = trace.get_tracer(__name__)\n\nwith tracer.start_as_current_span(\"foo\"):\n    with tracer.start_as_current_span(\"bar\"):\n        with tracer.start_as_current_span(\"baz\"):\n            print(\"Hello world from OpenTelemetry Python!\")\n", "path": "docs/getting_started/tracing_example.py"}]}