Skip to content

Commit

Permalink
Updating examples to use tracer_source (#360)
Browse files Browse the repository at this point in the history
Many examples were not updated to use the new named tracers code.

Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten authored and toumorokoshi committed Jan 20, 2020
1 parent ada53ff commit 3883e0a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ext/opentelemetry-ext-dbapi/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Usage
.. code:: python
import mysql.connector
from opentelemetry.trace import tracer
from opentelemetry.trace import tracer_source
from opentelemetry.ext.dbapi import trace_integration
# Ex: mysql.connector
trace_integration(tracer(), mysql.connector, "connect", "mysql")
trace_integration(tracer_source(), mysql.connector, "connect", "mysql")
References
Expand Down
4 changes: 2 additions & 2 deletions ext/opentelemetry-ext-http-requests/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Usage
import requests
import opentelemetry.ext.http_requests
from opentelemetry.trace import tracer
from opentelemetry.trace import tracer_source
opentelemetry.ext.http_requests.enable(tracer())
opentelemetry.ext.http_requests.enable(tracer_source())
response = requests.get(url='https://www.example.org/')
Limitations
Expand Down
4 changes: 2 additions & 2 deletions ext/opentelemetry-ext-mysql/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Usage
.. code:: python
import mysql.connector
from opentelemetry.trace import tracer
from opentelemetry.trace import tracer_source
from opentelemetry.ext.mysql import trace_integration
trace_integration(tracer())
trace_integration(tracer_source())
cnx = mysql.connector.connect(database='MySQL_Database')
cursor = cnx.cursor()
cursor.execute("INSERT INTO test (testField) VALUES (123)"
Expand Down
4 changes: 2 additions & 2 deletions ext/opentelemetry-ext-pymongo/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Usage
.. code:: python
from pymongo import MongoClient
from opentelemetry.trace import tracer
from opentelemetry.trace import tracer_source
from opentelemetry.trace.ext.pymongo import trace_integration
trace_integration(tracer())
trace_integration(tracer_source())
client = MongoClient()
db = client["MongoDB_Database"]
collection = db["MongoDB_Collection"]
Expand Down

0 comments on commit 3883e0a

Please sign in to comment.