Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating examples to use tracer_source #360

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't trace_integration take in parameter type tracer?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, it looks like the dbapi integration needs to be updated like the others in #301.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe @hectorhdzg is addressing this in [#298]



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