Using click / asyncclick instrumentation in a project that does not
already depend on opentelemetry-instrumentation raises a module
not found error.
Added opentelemetry-instrumentation as a dependency for click &
asyncclick.
* Create a utility to simplify recording request attributes.
* Update recording mechanism to record more request options.
* Improve the recording of span request attributes.
* Reformat with ruff.
* Update TODOs to reflect change made here.
* Update changelog now that PR has been created and can be referenced.
* Fix lint issues.
* Reformat with ruff.
* Add more documentation comments requested in the pull request.
* Add tests and comments that provide some additional clarity regarding the flattening logic in response to PR comments.
* Add tests and comments that provide some additional clarity regarding the flattening logic in response to PR comments.
* Handle corner case where flatten function returns compound output.
* Update prefix to match currently proposed SemConv.
* Update to specify attributes from SemConv constants per PR feedback.
* Use an allowlist for dynamic keys per PR feedback.
* Reformat with ruff.
* Fix lint issues.
* Reformat with ruff.
* Handle flattening errors more gracefully.
* Add support for more wildcards in the allowlist.
* Add a clearer type for the flatten functions.
* Simplify 'exclude_keys' initialization per PR feedback.
* Simplify AllowList constructor type annotation per PR feedback.
* Reformat with ruff.
* Resolve lint error concerning too many returns.
* Reformat with ruff.
* Update name to reflect requested changes in Semantic Conventions pull request #2125.
* Add test to verify correct handling of Unicode.
* Reformat with ruff.
* Remove deuplicated test.
This adds basic request and response gen_ai instrumentation for the following Bedrock model providers:
Cohere Command and Command R, Meta Llama, Mistral AI
* catch ModuleNotFoundError when the library is not installed and prevent exception from bubbling up
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* cleanup
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* remove dup test
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* Update CHANGELOG.md
---------
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
* Update version to 1.33.0.dev/0.54b0.dev
* Point CORE_REPO_SHA to opentelemetrybot/update-version-to-1.33.0.dev-0.54b0.dev
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* fix: grpc server ValueError when using unix sockets
with some grpc implementations the full .peer address is available
for unix sockets, which includes the socket path. it seems that
in versions of grpc prior to 1.53.0, the full path is returned by
`context.peer()`. rather than change the dependency of the instrumentation,
this updates it to more gracefully handle the case of the socket path
being present or absent.
Fixes#3393
* add changelog entry
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* botocore: add some more content to the README
This is taken from __init__.py documentation.
* Move the content to the README since it's not really code specific
* Add link to examples
* Apply suggestions from code review
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
---------
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
* botocore: test invokemodel tool calls against amazon nova
* botocore: handle amazon nova tool calls events for InvokeModelWithResponseStream
* Update documentation
* Update Changelog
* Please pylint
* Cleanup
* Reduce branches in tool calls tests
Instead pass down a per-model object that implements the peculiar part.
And fix recording of amazon.nova stream no content test.
* Move stream content extraction for tool calls tests to a couple of helpers
* Add instrumentation example to logging
* Add example output to logging instrumentation example
* Fix logging instrumentation example and output
* Fixing rst syntax for logging instrumentation examples
---------
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Remove bespoke request mocker. Replace with direct mocking of the underlying API.
* Refactor fake credentials to enable reuse.
* Add module to test end to end with a real client.
* Add redaction and minimal OTel mocking/testing in the e2e test.
* Fix wording of the documentation.
* Remove vcr migration from TODOs.
* Improve redaction and test naming.
* Minor tweaks in the code generation. Add casette files.
* Reformat with ruff.
* Fix lint and gzip issue.
* Reformat with ruff.
* Prevent fix for Python 3.9 from breaking tests in other versions.
* Record update in changelog.
* Don't double iterate when redacting by changing the value.
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
---------
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
* Handle empty strings
Safer check for a trailing semicolon that could handle
empty strings as well.
* Updated CHANGELOG.md
* Test for empty SQL strings in sqlcommenter
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>