Skip to content

Commit 6baf449

Browse files
authored
Merge branch 'main' into manual-autoinstrumentation
2 parents 760eb49 + f8bb30e commit 6baf449

File tree

30 files changed

+7575
-131
lines changed

30 files changed

+7575
-131
lines changed

.github/workflows/fossa.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: FOSSA scanning
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
fossa:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
18+
with:
19+
api-key: ${{secrets.FOSSA_API_KEY}}
20+
team: OpenTelemetry

.github/workflows/package-prepare-patch-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- opentelemetry-resource-detector-azure
1010
- opentelemetry-sdk-extension-aws
1111
- opentelemetry-instrumentation-openai-v2
12+
- opentelemetry-instrumentation-vertexai
1213
description: 'Package to be released'
1314
required: true
1415
jobs:

.github/workflows/package-prepare-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- opentelemetry-resource-detector-azure
1010
- opentelemetry-sdk-extension-aws
1111
- opentelemetry-instrumentation-openai-v2
12+
- opentelemetry-instrumentation-vertexai
1213
description: 'Package to be released'
1314
required: true
1415

.github/workflows/package-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- opentelemetry-resource-detector-azure
1010
- opentelemetry-sdk-extension-aws
1111
- opentelemetry-instrumentation-openai-v2
12+
- opentelemetry-instrumentation-vertexai
1213
description: 'Package to be released'
1314
required: true
1415
jobs:

.pre-commit-config.yaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
repos:
2-
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
# Ruff version.
4-
rev: v0.6.9
5-
hooks:
6-
# Run the linter.
7-
- id: ruff
8-
args: ["--fix", "--show-fixes"]
9-
# Run the formatter.
10-
- id: ruff-format
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
# Ruff version.
4+
rev: v0.6.9
5+
hooks:
6+
# Run the linter.
7+
- id: ruff
8+
args: ["--fix", "--show-fixes"]
9+
# Run the formatter.
10+
- id: ruff-format
11+
- repo: https://github.com/astral-sh/uv-pre-commit
12+
# uv version.
13+
rev: 0.6.0
14+
hooks:
15+
- id: uv-lock

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Added
1515

16+
- `opentelemetry-instrumentation-system-metrics` Add `process` metrics and deprecated `process.runtime` prefixed ones
17+
([#3250](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3250))
1618
- `opentelemetry-instrumentation-botocore` Add support for GenAI user events and lazy initialize tracer
1719
([#3258](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3258))
1820
- `opentelemetry-instrumentation-botocore` Add support for GenAI system events

CONTRIBUTING.md

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,31 @@ Please also read the [OpenTelemetry Contributor Guide](https://github.com/open-t
1919

2020
## Index
2121

22-
* [Find a Buddy and get Started Quickly](#find-a-buddy-and-get-started-quickly)
23-
* [Development](#development)
24-
* [Troubleshooting](#troubleshooting)
25-
* [Benchmarks](#benchmarks)
26-
* [Pull requests](#pull-requests)
27-
* [How to Send Pull Requests](#how-to-send-pull-requests)
28-
* [How to Receive Comments](#how-to-receive-comments)
29-
* [How to Get PRs Reviewed](#how-to-get-prs-reviewed)
30-
* [How to Get PRs Merged](#how-to-get-prs-merged)
31-
* [Design Choices](#design-choices)
32-
* [Focus on Capabilities, Not Structure Compliance](#focus-on-capabilities-not-structure-compliance)
33-
* [Running Tests Locally](#running-tests-locally)
34-
* [Testing against a different Core repo branch/commit](#testing-against-a-different-core-repo-branchcommit)
35-
* [Style Guide](#style-guide)
36-
* [Guideline for instrumentations](#guideline-for-instrumentations)
37-
* [Guideline for GenAI instrumentations](#guideline-for-genai-instrumentations)
38-
* [Expectations from contributors](#expectations-from-contributors)
22+
- [Contributing to opentelemetry-python-contrib](#contributing-to-opentelemetry-python-contrib)
23+
- [Index](#index)
24+
- [Find a Buddy and get Started Quickly](#find-a-buddy-and-get-started-quickly)
25+
- [Development](#development)
26+
- [Virtual Environment](#virtual-environment)
27+
- [Troubleshooting](#troubleshooting)
28+
- [Benchmarks](#benchmarks)
29+
- [Pull Requests](#pull-requests)
30+
- [How to Send Pull Requests](#how-to-send-pull-requests)
31+
- [How to Receive Comments](#how-to-receive-comments)
32+
- [How to Get PRs Reviewed](#how-to-get-prs-reviewed)
33+
- [How to Get PRs Merged](#how-to-get-prs-merged)
34+
- [Design Choices](#design-choices)
35+
- [Focus on Capabilities, Not Structure Compliance](#focus-on-capabilities-not-structure-compliance)
36+
- [Running Tests Locally](#running-tests-locally)
37+
- [Testing against a different Core repo branch/commit](#testing-against-a-different-core-repo-branchcommit)
38+
- [Style Guide](#style-guide)
39+
- [Guideline for instrumentations](#guideline-for-instrumentations)
40+
- [Update supported instrumentation package versions](#update-supported-instrumentation-package-versions)
41+
- [Guideline for GenAI instrumentations](#guideline-for-genai-instrumentations)
42+
- [Get Involved](#get-involved)
43+
- [Expectations from contributors](#expectations-from-contributors)
44+
- [Updating supported Python versions](#updating-supported-python-versions)
45+
- [Bumping the Python baseline](#bumping-the-python-baseline)
46+
- [Adding support for a new Python release](#adding-support-for-a-new-python-release)
3947

4048
## Find a Buddy and get Started Quickly
4149

@@ -93,6 +101,20 @@ See
93101
[`tox.ini`](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/tox.ini)
94102
for more detail on available tox commands.
95103

104+
### Virtual Environment
105+
106+
You can also create a single virtual environment to make it easier to run local tests.
107+
108+
For that, you'll need to install [`uv`](https://docs.astral.sh/uv/getting-started/installation/).
109+
110+
After installing `uv`, you can run the following command:
111+
112+
```sh
113+
uv sync
114+
```
115+
116+
This will create a virtual environment in the `.venv` directory and install all the necessary dependencies.
117+
96118
### Troubleshooting
97119

98120
Some packages may require additional system-wide dependencies to be installed. For example, you may need to install `libpq-dev` to run the postgresql client libraries instrumentation tests or `libsnappy-dev` to run the prometheus exporter tests. If you encounter a build error, please check the installation instructions for the package you are trying to run tests for.

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
> - opentelemetry-resource-detector-azure
2222
> - opentelemetry-sdk-extension-aws
2323
> - opentelemetry-instrumentation-openai-v2
24-
>
24+
> - opentelemetry-instrumentation-vertexai
2525
> These libraries are also excluded from the general release.
2626
2727
Package release preparation is handled by the [`[Package] Prepare release`](./.github/workflows/package-prepare-release.yml) workflow that allows

instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/manual/README.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ your OpenAI requests.
1111

1212
Note: `.env <.env>`_ file configures additional environment variables:
1313

14-
- `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true` configures
15-
OpenAI instrumentation to capture prompt and completion contents on
16-
events.
14+
- ``OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`` configures OpenAI instrumentation to capture prompt and completion contents on events.
1715

1816
Setup
1917
-----
2018

21-
Minimally, update the `.env <.env>`_ file with your "OPENAI_API_KEY". An
19+
Minimally, update the `.env <.env>`_ file with your ``OPENAI_API_KEY``. An
2220
OTLP compatible endpoint should be listening for traces and logs on
23-
http://localhost:4317. If not, update "OTEL_EXPORTER_OTLP_ENDPOINT" as well.
21+
http://localhost:4317. If not, update ``OTEL_EXPORTER_OTLP_ENDPOINT`` as well.
2422

2523
Next, set up a virtual environment like this:
2624

instrumentation-genai/opentelemetry-instrumentation-openai-v2/examples/zero-code/README.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,16 @@ your OpenAI requests.
1212

1313
Note: `.env <.env>`_ file configures additional environment variables:
1414

15-
- `OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true` configures
16-
OpenTelemetry SDK to export logs and events.
17-
- `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true` configures
18-
OpenAI instrumentation to capture prompt and completion contents on
19-
events.
20-
- `OTEL_LOGS_EXPORTER=otlp` to specify exporter type.
15+
- ``OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true`` configures OpenTelemetry SDK to export logs and events.
16+
- ``OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`` configures OpenAI instrumentation to capture prompt and completion contents on events.
17+
- ``OTEL_LOGS_EXPORTER=otlp`` to specify exporter type.
2118

2219
Setup
2320
-----
2421

25-
Minimally, update the `.env <.env>`_ file with your "OPENAI_API_KEY". An
22+
Minimally, update the `.env <.env>`_ file with your ``OPENAI_API_KEY``. An
2623
OTLP compatible endpoint should be listening for traces and logs on
27-
http://localhost:4317. If not, update "OTEL_EXPORTER_OTLP_ENDPOINT" as well.
24+
http://localhost:4317. If not, update ``OTEL_EXPORTER_OTLP_ENDPOINT`` as well.
2825

2926
Next, set up a virtual environment like this:
3027

0 commit comments

Comments
 (0)