Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ repos:
rev: 0.6.0
hooks:
- id: uv-lock
- repo: https://github.com/rstcheck/rstcheck
rev: 77490ffa33bfc0928975ae3cf904219903db755d # frozen: v6.2.5
hooks:
- id: rstcheck
additional_dependencies: ['rstcheck[sphinx]']
args: ["--report-level", "warning"]
2 changes: 2 additions & 0 deletions .rstcheck.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[rstcheck]
ignore_directives = automodule
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- `opentelemetry-instrumentation`: botocore: Add support for AWS Secrets Manager semantic convention attribute
([#3765](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3765))
- Add `rstcheck` to pre-commit to stop introducing invalid RST
([#3777](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3777))


## Version 1.37.0/0.58b0 (2025-09-11)

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ You can run `tox` with the following arguments:
* `tox -e generate-workflows` to run creation of new CI workflows if tox environments have been updated
* `tox -e ruff` to run ruff linter and formatter checks against the entire codebase

`ruff check` and `ruff format` are executed when `tox -e ruff` is run. We strongly recommend you to configure [pre-commit](https://pre-commit.com/) locally to run `ruff` automatically before each commit by installing it as git hooks. You just need to [install pre-commit](https://pre-commit.com/#install) in your environment:
`ruff check` and `ruff format` are executed when `tox -e ruff` is run. We strongly recommend you to configure [pre-commit](https://pre-commit.com/) locally to run `ruff` and `rstcheck` automatically before each commit by installing it as git hooks. You just need to [install pre-commit](https://pre-commit.com/#install) in your environment:

```console
pip install pre-commit -c dev-requirements.txt
Expand Down
4 changes: 2 additions & 2 deletions _template/README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OpenTelemetry <REPLACE ME> Instrumentation
===========================
==========================================

|pypi|

Expand All @@ -20,5 +20,5 @@ Installation
References
----------

* `OpenTelemetry <REPLACE ME>/ Tracing <https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/<REPLACE ME>/<REPLACE ME>.html>`_
* `OpenTelemetry REPLACE ME/ Tracing <https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/REPLACE ME/REPLACE ME.html>`_
* `OpenTelemetry Project <https://opentelemetry.io/>`_
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OpenTelemetry Google GenAI SDK Manual Instrumentation Example
============================================
=============================================================

This is an example of how to instrument Google GenAI SDK calls when configuring
OpenTelemetry SDK and Instrumentations manually.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OpenTelemetry Google GenAI SDK Manual Instrumentation Example
============================================
=============================================================

This is an example of how to instrument Google GenAI SDK calls with zero code changes,
using `opentelemetry-instrument`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
OpenTelemetry Langcahin Instrumentation Example
============================================
===============================================

This is an example of how to instrument Langchain when configuring OpenTelemetry SDK and instrumentations manually.

When :code:`main.py <main.py>`_ is run, it exports traces to an OTLP-compatible endpoint.
When `main.py <main.py>`_ is run, it exports traces to an OTLP-compatible endpoint.
Traces include details such as the span name and other attributes.

Note: :code:`.env <.env>`_ file configures additional environment variables:
Note: `.env <.env>`_ file configures additional environment variables:
- :code:`OTEL_LOGS_EXPORTER=otlp` to specify exporter type.
- :code:`OPENAI_API_KEY` open AI key for accessing the OpenAI API.
- :code:`OTEL_EXPORTER_OTLP_ENDPOINT` to specify the endpoint for exporting traces (default is http://localhost:4317).

Setup
-----

Minimally, update the :code:`.env <.env>`_ file with your :code:`OPENAI_API_KEY`.
Minimally, update the `.env <.env>`_ file with your :code:`OPENAI_API_KEY`.
An OTLP compatible endpoint should be listening for traces http://localhost:4317.
If not, update :code:`OTEL_EXPORTER_OTLP_ENDPOINT` as well.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
OpenTelemetry Langchain Zero-Code Instrumentation Example
======================================================
=========================================================

This is an example of how to instrument Langchain with zero code changes,
using `opentelemetry-instrument`.

When :code:`main.py <main.py>`_ is run, it exports traces to an OTLP-compatible endpoint.
When `main.py <main.py>`_ is run, it exports traces to an OTLP-compatible endpoint.
Traces include details such as the span name and other attributes.

Note: :code:`.env <.env>`_ file configures additional environment variables:
Note: `.env <.env>`_ file configures additional environment variables:
- :code:`OTEL_LOGS_EXPORTER=otlp` to specify exporter type.
- :code:`OPENAI_API_KEY` open AI key for accessing the OpenAI API.
- :code:`OTEL_EXPORTER_OTLP_ENDPOINT` to specify the endpoint for exporting traces (default is http://localhost:4317).

Setup
-----

Minimally, update the :code:`.env <.env>`_ file with your :code:`OPENAI_API_KEY`.
Minimally, update the `.env <.env>`_ file with your :code:`OPENAI_API_KEY`.
An OTLP compatible endpoint should be listening for traces http://localhost:4317.
If not, update :code:`OTEL_EXPORTER_OTLP_ENDPOINT` as well.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OpenTelemetry VertexAI Instrumentation Example
============================================
==============================================

This is an example of how to instrument VertexAI calls when configuring OpenTelemetry SDK and Instrumentations manually.

Expand All @@ -12,8 +12,8 @@ your VertexAI requests.
Note: `.env <.env>`_ file configures additional environment variables:

- `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true` configures
VertexAI instrumentation to capture prompt and completion contents on
events.
VertexAI instrumentation to capture prompt and completion contents on
events.

Setup
-----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OpenTelemetry VertexAI Instrumentation Example
============================================
==============================================

This is an example of how to instrument VertexAI calls with zero code changes,
using `opentelemetry-instrument`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The hooks can be configured as follows:
# `request_obj` is an instance of urllib.request.Request
# `response` is an instance of http.client.HTTPResponse
def response_hook(span, request_obj, response)
def response_hook(span, request_obj, response):
pass
URLLibInstrumentor().instrument(
Expand Down