* opentelemetry-instrumentation-system-metrics: add process metrics
Add process metrics as of 1.30.0 semconv to the system metrics instrumentation.
We still keep around the old process.runtime metrics because the semconv
suggest to not break current users. Still discourage their use in the
doc and state explicitly they are deprecated.
* Add Changelog
* Please pylint
* Apply suggestions from code review
* Remove print
* Remove process.count and fix system metrics enumeration in tests
* Cleanup metrics presence assertions
* Don't touch system metrics descriptions
* Add default for num_cpu in case it returns None to avoid division error
* Use UV to install all needed packages locally
* Add opentelemetry-test-utils
* Add asgi and fastapi
* Add more projects, since it helped me
* add urllib
* Add system metrics
* Add dbapi and sqlite3
* Add sqlalchemy
* add pyramid
* Add pymongo
* Add jinja2
* add lock file
* add falcon as well
* Add uv lock to the pre-commit
* Update uv.lock
* Update lockfile
* remove xray test dependencies
* Add otel-sdk to xray
* Update uv version
* Drop xray from the list of packages
---------
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Follow-up on the apparently abbandonned https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2114.
The asyncpg instrumentation attempts to fall back on using the database
name as the span name in case the first argument to the instrumented
method is falsey.
This has probably never worked since asyncpg defines the `_params`
attribute as an instance of `ConnectionParams`
(https://github.com/MagicStack/asyncpg/blob/master/asyncpg/connection.py#L62)
which is a NamedTuple instance and thus don't define `get`. The proper
way of safely accessing properties on a NamedTuple is using `getattr`.
The only case that I've actually found which triggers this branch is if
the supplied query is an empty string. This is something that causes an
`AttributeError` for `Connection.execute` but is fine for `fetch()`,
`fetchval()`, `fetchrow()` and `executemany()`.
The tests have been expanded to check these cases. Also, more status
code validation has been added where it was missing.
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Create per-extension tracers if there's an extension available
* botocore: add user events for bedrock
* Remove pass of AWS env vars from tox.ini
* Remove handling for other types of messages
* Please pylint
* Add changelog
* Update CHANGELOG.md
Co-authored-by: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
---------
Co-authored-by: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
* Add Vertex gen AI response span attributes
* Vertex response gen_ai.choice events
* Add todo comment
* Update _map_finish_reason() and use it in span attribute as well
* ruff
* Add basic handling for invoke.model
* Add changelog a please pylint
* Record converse cassettes against us-east-1
* Avoid double copy of streaming body
---------
Co-authored-by: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
* Added Vertex AI spans for request parameters
* small fixes, get CI passing
* Use standard OTel tracing error handling
* move nested util
* Actually use GAPIC client since thats what we use under the hood
Also this is what LangChain uses
* Comment out seed for now
* Remove unnecessary dict.get() calls
* Typing improvements to check that we support both v1 and v1beta1
* Add more teest cases for error conditions and fix span name bug
* fix typing
* Add todos for error.type
If we are not running inside AWS Lambda don't print warnings on missing
OTel lambda extension layer.
The instrumentation is installed by the OTel k8s operator and so this
warning may confuse users.
* botocore: add extension for bedrock runtime api
* Add tests and handle only non streaming responses
* Make it explicit we are handling only the converse operation
* Simplify test since all models behaves the same
* Add test for error case and rework things a bit
* Add converse example
* Generate workflows
* Add changelog
* Add type hints to Psycopg
* fix tests
* fix
* Add psycopg.Connection to nitpick
* Add py.typed
* add psycopg to nitpick again
* add psycopg to nitpick again
* move py.typed to the right folder
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Support PEP 561 to `opentelemetry-instrumentation-urllib`
* add future
---------
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>