Commit e723ee5
Sync e2e with Main + Rnference PR (#16)
* cherry pick changes from previous PR
* move span utils to new file
* remove span state, use otel context for parent/child
* flatten LLMInvocation to use attributes instead of dict keys
* helper function and docstrings
* refactor: store span and context token in LLMInvocation instead of SpanGenerator
* refactor: rename prompts/chat_generations to input_messages/output_messages for clarity
* refactor: simplify TelemetryHandler API by moving invocation data management to LLMInvocation class
* refactor: update relative imports to absolute imports
* Update handler to use a context manager instead of start_llm and stop_llm
* resolve tox -e doc failure
* safeguard against empty request-model
* fix tox typecheck errors for utils
* refactor: move tracer to generator, clean up dead code
* remove unused linting hint
* back off stricter request-model requirements
* reintroduce manual start/stop for langchain callback flow
* Fix typecheck in langchain instrumentation (open-telemetry#3773)
* fix typecheck
* fix ruff and added changelog
* added lambda list
* Update instrumentation-genai/opentelemetry-instrumentation-langchain/CHANGELOG.md
---------
Co-authored-by: Riccardo Magliocchetti <[email protected]>
* botocore: Add support for AWS Secrets Manager semantic convention attribute (open-telemetry#3765)
* botocore: Add support for AWS Secrets Manager semantic convention attribute
AWS Secrets Manager defines semantic convention attribute:
AWS_SECRETSMANAGER_SECRET_ARN: Final = "aws.secretsmanager.secret.arn"
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/aws.md#amazon-secrets-manager-attributes
Currently, this attribute is not set in the botocore instrumentation library. This PR adds support for them by extracting values from both Request and Response objects.
Tests
Added new unit tests (passing).
Verified with:
tox -e py312-test-instrumentation-botocore
tox -e spellcheck
tox -e lint-instrumentation-botocore
tox -e ruff
Backward Compatibility
This change is backward compatible. It only adds instrumentation for additional AWS resources and does not modify existing behavior in the auto-instrumentation library.
* add ChangeLog.
* Update instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/secretsmanager.py
Co-authored-by: Tammy Baylis <[email protected]>
* Update instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_secretsmanager.py
---------
Co-authored-by: Tammy Baylis <[email protected]>
Co-authored-by: Emídio Neto <[email protected]>
Co-authored-by: Riccardo Magliocchetti <[email protected]>
* clean up context handler, clarify unit tests
* Rename UploadHook -> CompletionHook (open-telemetry#3780)
* Add opentelemetry-util-genai to the package release workflow (open-telemetry#3781)
* Fix package release workflows version.py finding (open-telemetry#3782)
Looking at the files in this repo, the version file is always called version.py (and it should be). Tested the find command locally.
```shell
$ for f in $(git ls-files '*version*.py'); do basename $f; done | sort -u
test_version.py
version.py
$ find util/opentelemetry-util-genai/ -type f -path "**/version.py"
util/opentelemetry-util-genai/src/opentelemetry/util/genai/version.py
```
* Adjust opentelemetry-instrumentation-vertexai dependency on opentelemetry-genai-util (open-telemetry#3785)
This fixes the CI failure on the release PRs for opentelemetry-util-genai
- open-telemetry#3784 (needs cherry pick)
- open-telemetry#3783
* Fix exception handling for JSON decoding (open-telemetry#3787)
* Add rstcheck in pre-commit (open-telemetry#3777)
* Fix a bunch of rstcheck warnings
* Add rstcheck to pre-commit
* Ignore automodule
* Update changelog and contributing
* tox -e ruff -> tox -e precommit
But keep the old name for compat
* remove generator concept
* update token types
* Update opentelemetry-util-genai version to v0.2b0 (open-telemetry#3783)
Co-authored-by: otelbot <[email protected]>
Co-authored-by: Aaron Abbott <[email protected]>
---------
Co-authored-by: wrisa <[email protected]>
Co-authored-by: Riccardo Magliocchetti <[email protected]>
Co-authored-by: Luke (GuangHui) Zhang <[email protected]>
Co-authored-by: Tammy Baylis <[email protected]>
Co-authored-by: Emídio Neto <[email protected]>
Co-authored-by: Aaron Abbott <[email protected]>
Co-authored-by: Charlie Jonas <[email protected]>
Co-authored-by: otelbot[bot] <197425009+otelbot[bot]@users.noreply.github.com>
Co-authored-by: otelbot <[email protected]>1 parent 93ecfc1 commit e723ee5
File tree
32 files changed
+236
-206
lines changed- .github/workflows
- _template
- docs/instrumentation-genai
- instrumentation-genai
- opentelemetry-instrumentation-google-genai/examples
- manual
- zero-code
- opentelemetry-instrumentation-langchain/examples
- manual
- zero-code
- opentelemetry-instrumentation-vertexai
- examples
- manual
- zero-code
- instrumentation
- opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions
- opentelemetry-instrumentation-urllib
- util/opentelemetry-util-genai
- src/opentelemetry/util/genai
- _fsspec_upload
- tests
32 files changed
+236
-206
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
| 160 | + | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
87 | 88 | | |
88 | | - | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments