* fix(grpc): Support non-list interceptors
The GRPC integration assumes that if interceptors are provided, they will be
a list, when GRPC itself types them as Sequence. With this change, we're
making the codepaths using interceptors more robust by explicitly turning them
into lists before manipulating them.
* Add a changelog entry
* .
* Run ruff
* Simplify
* Begin work to instrument tool calls.
* Add tests as well as the ability to record function details in span attributes.
* Add tests for the tool call wrapper utility.
* Update the changelog.
* Reformat with ruff.
* Switch to dictionary comprehension per lint output.
* Address generic names foo, bar flagged by lint.
* Reformat with ruff.
* Update to record function details only on the span.
* Reformat with ruff.
* Fix lint issue with refactoring improvement.
* Reformat with ruff.
* Improve attribute handling and align with 'execute_tool' span spec.
* Pass through the extra span arguments.
* Fix lint issues.
* Reformat with ruff.
* Update instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/tool_call_wrapper.py
---------
Co-authored-by: Aaron Abbott <aaronabbott@google.com>
* ref: migrate from SpanAttributes
* B
reverted to SpanAttributes for the SCHEMA_URL
* replace SpanAttributes.SCHEMA_URL
* sort imports
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* refactor(fastapi): migrate HTTP_ROUTE from SpanAttributes to new semantic conventions
Replaced usage of `SpanAttributes.HTTP_ROUTE` with `opentelemetry.semconv.attributes.http_attributes.HTTP_ROUTE`
as part of the migration away from `SpanAttributes`.
Refs: #3475
* refactor(fastapi): refactor tests
* refactor(fastapi): remove duplicated import
* sort imports
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Update botocore instrumentation to use semantic convention attribute for cloud region
* Update changelog
* Move cloud region attribute to the breaking changes in the changelog
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Rough draft of the contribution
* Add connection instrumentation based on the existing pattern.
add a helper function assert_span_count to simplify tests
add unit tests for pipeline hooks
* fix tests to use fake redis
* replace the redis version checks with defines
* Adjust comment and fix one test
* Update documentation with the client method
* Update the changelog
* Update the HTTPX readme to point to proper class method
* Add back the assert_span_count method
* Move the changelog update to the unreleased section
* Remove extra whitespace in the Changelog
* Fix linter complaints
* Remove hasattr assert
* Move the Changelog to Unreleased
* Review comments. Move types to types.py, move some functions to util.py. Tested and verified docs.
* Fix type compatibility
* fix typing and lint
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
* Capture server attributes for botocore API calls
* fix: use typing.Dict for 3.8 compatibility and resolve failing tests
* Update changelog
* Add server and port assertions for Bedrock API calls
* Add server address and port to Bedrock metric attributes
* Add license header and deferred type hint evaluation in utils.py
* Refactor metric attributes creation and add linter suppression (too-many-lines) for bedrock.py
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
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>