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

adding instructions to port instrumentation #26

Merged

Conversation

codeboten
Copy link
Contributor

Adding some instructions on how to get started porting instrumentation. More information to be added later once we have travis sorted out for testing.

Copy link
Member

@mauriciovasquezbernal mauriciovasquezbernal left a comment

Choose a reason for hiding this comment

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

I like it. It's a good starting point, I think we could extend (in further PRs) the instructions about how to update the code to use the opentelemetry API.

Co-Authored-By: Mauricio Vásquez <mauricio@kinvolk.io>
@codeboten codeboten requested a review from a team April 8, 2020 21:33
README.md Outdated

```bash
mkdir -p instrumentors/jinja2/src/opentelemetry/ext/jinja2
git mv instrumentors/jinja2/*.py instrumentors/jinja2/src/opentelemetry/ext/jinja2
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not use ext but instrumentors.


::

pip install opentelemetry-ext-<REPLACE ME>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pip install opentelemetry-ext-<REPLACE ME>
pip install opentelemetry-instrumentors-<REPLACE ME>

References
----------

* `OpenTelemetry <REPLACE ME>/ Tracing <https://opentelemetry-python.readthedocs.io/en/latest/ext/<REPLACE ME>/<REPLACE ME>.html>`_
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* `OpenTelemetry <REPLACE ME>/ Tracing <https://opentelemetry-python.readthedocs.io/en/latest/ext/<REPLACE ME>/<REPLACE ME>.html>`_
* `OpenTelemetry <REPLACE ME>/ Tracing <https://opentelemetry-python.readthedocs.io/en/latest/instrumentors/<REPLACE ME>/<REPLACE ME>.html>`_

"opentelemetry_instrumentor": [
# REPLACE ME: the entrypoint for the instrumentor e.g
# "sqlalchemy = opentelemetry.ext.sqlalchemy:SQLAlchemyInstrumentor"
"<REPLACE ME> = opentelemetry.ext.<REPLACE>"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"<REPLACE ME> = opentelemetry.ext.<REPLACE>"
"<REPLACE ME> = opentelemetry.instrumentors.<REPLACE>"

BASE_DIR = os.path.dirname(__file__)
VERSION_FILENAME = os.path.join(
# REPLACE ME: the path to the version file e.g
# BASE_DIR, "src", "opentelemetry", "ext", "sqlalchemy", "version.py"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# BASE_DIR, "src", "opentelemetry", "ext", "sqlalchemy", "version.py"
# BASE_DIR, "src", "opentelemetry", "instrumentors", "sqlalchemy", "version.py"

README.md Outdated
5. Add `version.py` file and update it accordingly

```bash
mv instrumentors/jinja2/version.py instrumentors/jinja2/src/opentelemetry/ext/jinja2/version.py
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mv instrumentors/jinja2/version.py instrumentors/jinja2/src/opentelemetry/ext/jinja2/version.py
mv instrumentors/jinja2/version.py instrumentors/jinja2/src/opentelemetry/instrumentors/jinja2/version.py


|pypi|

.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-<REPLACE ME>.svg
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-<REPLACE ME>.svg
.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentors-<REPLACE ME>.svg

|pypi|

.. |pypi| image:: https://badge.fury.io/py/opentelemetry-ext-<REPLACE ME>.svg
:target: https://pypi.org/project/opentelemetry-ext-<REPLACE ME>/
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
:target: https://pypi.org/project/opentelemetry-ext-<REPLACE ME>/
:target: https://pypi.org/project/opentelemetry-instrumentors-<REPLACE ME>/

# limitations under the License.
#
[metadata]
# opentelemetry-ext plus the name of the library being instrument e.g
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# opentelemetry-ext plus the name of the library being instrument e.g
# opentelemetry-instrumentors plus the name of the library being instrument e.g

#
[metadata]
# opentelemetry-ext plus the name of the library being instrument e.g
# name = opentelemetry-ext-sqlalchemy
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# name = opentelemetry-ext-sqlalchemy
# name = opentelemetry-instrumentors-sqlalchemy

Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

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

LGTM

Co-Authored-By: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>
Copy link
Contributor

@ocelotl ocelotl left a comment

Choose a reason for hiding this comment

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

LGTM

@codeboten codeboten merged commit 1bc2440 into open-telemetry:master Apr 9, 2020
NathanielRN pushed a commit to NathanielRN/opentelemetry-python-contrib-1 that referenced this pull request Oct 17, 2020
Auto discover namespace packages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants