diff --git a/.github/workflows/python-CI.yaml b/.github/workflows/python-CI.yaml index e0face5436..c60c9f7a24 100644 --- a/.github/workflows/python-CI.yaml +++ b/.github/workflows/python-CI.yaml @@ -12,11 +12,15 @@ defaults: working-directory: ./python jobs: - ci: - name: CI Python - runs-on: oss-4-core-runner + changes: + name: Filter Changes + runs-on: ubuntu-latest + outputs: + diff_files: ${{ steps.filter.outputs.diff_files }} steps: - uses: actions/checkout@v4 + with: + sparse-checkout: python - uses: dorny/paths-filter@v3 id: filter with: @@ -26,8 +30,17 @@ jobs: diff: - "python/**/*.py" - "python/**/*.toml" + + find-tox-testenv: + name: Find Tox Testenv + needs: changes + if: ${{ needs.changes.outputs.diff_files != '' }} + runs-on: ubuntu-latest + outputs: + list: ${{ steps.testenv.outputs.list }} + steps: - run: >- - echo "packages=$(echo '${{ steps.filter.outputs.diff_files }}' + echo "list=$(echo '${{ needs.changes.outputs.diff_files }}' | jq -r '.[]' | sed -n -e 's/^python\/instrumentation\/openinference-instrumentation-\([^/]*\)\/.*/\1/p' @@ -37,20 +50,39 @@ jobs: | sed -e 's/semantic-conventions/semconv/' -e 's/-/_/' -e 's/^/\\b/' | paste -sd "|" -)" >> "$GITHUB_OUTPUT" - if: ${{ steps.filter.outputs.diff == 'true' }} - id: changes + id: packages + - uses: actions/checkout@v4 + with: + sparse-checkout: python - uses: actions/setup-python@v5 - if: ${{ (steps.filter.outputs.diff == 'true') && (steps.changes.outputs.packages != '') }} - with: - python-version: | - 3.8 - 3.9 - 3.10 - 3.11 - 3.12 - - run: pip install tox-uv==1.11.2 - if: ${{ (steps.filter.outputs.diff == 'true') && (steps.changes.outputs.packages != '') }} + with: + python-version: 3.8 + - uses: astral-sh/setup-uv@v5 + with: + version: 0.5.27 - run: >- - tox run-parallel --parallel-no-spinner - -e $(tox -l | egrep -e '${{ steps.changes.outputs.packages }}' | paste -sd, -) - if: ${{ (steps.filter.outputs.diff == 'true') && (steps.changes.outputs.packages != '') }} + echo "list=$(uvx --with tox-uv tox -l + | egrep -e '${{ steps.packages.outputs.list }}' + | jq -R -s 'split("\n")[:-1]')" + >> $GITHUB_OUTPUT + id: testenv + + run-tox-testenv: + name: Run Tox Testenv + needs: find-tox-testenv + if: ${{ needs.find-tox-testenv.outputs.list != '' }} + runs-on: ubuntu-latest + strategy: + matrix: + testenv: ${{ fromJSON(needs.find-tox-testenv.outputs.list) }} + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: python + - uses: actions/setup-python@v5 + with: + python-version: 3.8 + - uses: astral-sh/setup-uv@v5 + with: + version: 0.5.27 + - run: uvx --with tox-uv tox run -e ${{ matrix.testenv }} -- -ra -x diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 806eaf2c15..b9852f56e1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -8,7 +8,7 @@ "python/instrumentation/openinference-instrumentation-mistralai": "1.1.0", "python/openinference-instrumentation": "0.1.21", "python/instrumentation/openinference-instrumentation-guardrails": "0.1.3", - "python/instrumentation/openinference-instrumentation-vertexai": "0.1.4", + "python/instrumentation/openinference-instrumentation-vertexai": "0.1.5", "python/instrumentation/openinference-instrumentation-crewai": "0.1.4", "python/instrumentation/openinference-instrumentation-haystack": "0.1.14", "python/instrumentation/openinference-instrumentation-litellm": "0.1.7", diff --git a/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/_with_span.py b/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/_with_span.py index 993df0d7d4..88a341026e 100644 --- a/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/_with_span.py +++ b/python/instrumentation/openinference-instrumentation-groq/src/openinference/instrumentation/groq/_with_span.py @@ -19,6 +19,7 @@ class _WithSpan: def __init__( self, span: trace_api.Span, + context_attributes: Attributes = None, extra_attributes: Attributes = None, ) -> None: diff --git a/python/instrumentation/openinference-instrumentation-mistralai/src/openinference/instrumentation/mistralai/_stream.py b/python/instrumentation/openinference-instrumentation-mistralai/src/openinference/instrumentation/mistralai/_stream.py index e3965b3de8..8a6c604724 100644 --- a/python/instrumentation/openinference-instrumentation-mistralai/src/openinference/instrumentation/mistralai/_stream.py +++ b/python/instrumentation/openinference-instrumentation-mistralai/src/openinference/instrumentation/mistralai/_stream.py @@ -23,6 +23,7 @@ ) logger = logging.getLogger(__name__) + logger.addHandler(logging.NullHandler()) diff --git a/python/instrumentation/openinference-instrumentation-vertexai/CHANGELOG.md b/python/instrumentation/openinference-instrumentation-vertexai/CHANGELOG.md index 26b9eeacb7..4c132f07f4 100644 --- a/python/instrumentation/openinference-instrumentation-vertexai/CHANGELOG.md +++ b/python/instrumentation/openinference-instrumentation-vertexai/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [0.1.5](https://github.com/RogerHYang/openinference/compare/python-openinference-instrumentation-vertexai-v0.1.4...python-openinference-instrumentation-vertexai-v0.1.5) (2025-02-04) + + +### Features + +* VertexAI instrumentor ([#588](https://github.com/RogerHYang/openinference/issues/588)) ([32e297d](https://github.com/RogerHYang/openinference/commit/32e297dccfaa0ba43b984b1c7c77f19ed67883e2)) +* **vertexai:** Enable configuration using common instrumentation pkg ([#686](https://github.com/RogerHYang/openinference/issues/686)) ([fb3278c](https://github.com/RogerHYang/openinference/commit/fb3278ce4cb328715f3f42f3dcb583a584a67f82)) + + +### Bug Fixes + +* increase version lower bound for openinference-instrumentation ([#1012](https://github.com/RogerHYang/openinference/issues/1012)) ([3236d27](https://github.com/RogerHYang/openinference/commit/3236d2733a46b84d693ddb7092209800cde8cc34)) +* Rename base tracer and masked span ([#693](https://github.com/RogerHYang/openinference/issues/693)) ([861ea4b](https://github.com/RogerHYang/openinference/commit/861ea4ba45cf02a1d0519a7cd2c5c6ca5d74115b)) + + +### Documentation + +* TraceConfig and context attributes ([#793](https://github.com/RogerHYang/openinference/issues/793)) ([d3808c4](https://github.com/RogerHYang/openinference/commit/d3808c4bea3f6a4c72d3a7ea09b54e78072be6fd)) + ## [0.1.4](https://github.com/Arize-ai/openinference/compare/python-openinference-instrumentation-vertexai-v0.1.3...python-openinference-instrumentation-vertexai-v0.1.4) (2024-10-31) diff --git a/python/instrumentation/openinference-instrumentation-vertexai/src/openinference/instrumentation/vertexai/version.py b/python/instrumentation/openinference-instrumentation-vertexai/src/openinference/instrumentation/vertexai/version.py index bbab0242f6..1276d0254f 100644 --- a/python/instrumentation/openinference-instrumentation-vertexai/src/openinference/instrumentation/vertexai/version.py +++ b/python/instrumentation/openinference-instrumentation-vertexai/src/openinference/instrumentation/vertexai/version.py @@ -1 +1 @@ -__version__ = "0.1.4" +__version__ = "0.1.5" diff --git a/python/openinference-instrumentation/src/openinference/instrumentation/config.py b/python/openinference-instrumentation/src/openinference/instrumentation/config.py index 7c51520371..3e1ce61e5f 100644 --- a/python/openinference-instrumentation/src/openinference/instrumentation/config.py +++ b/python/openinference-instrumentation/src/openinference/instrumentation/config.py @@ -192,6 +192,7 @@ class TraceConfig: "default_value": DEFAULT_HIDE_LLM_INVOCATION_PARAMETERS, }, ) + hide_inputs: Optional[bool] = field( default=None, metadata={ diff --git a/python/openinference-semantic-conventions/src/openinference/semconv/trace/__init__.py b/python/openinference-semantic-conventions/src/openinference/semconv/trace/__init__.py index 3c18129226..79faa3b2ac 100644 --- a/python/openinference-semantic-conventions/src/openinference/semconv/trace/__init__.py +++ b/python/openinference-semantic-conventions/src/openinference/semconv/trace/__init__.py @@ -16,6 +16,7 @@ class SpanAttributes: """ EMBEDDING_EMBEDDINGS = "embedding.embeddings" + """ A list of objects containing embedding data, including the vector and represented piece of text. """