Skip to content

[opentelemetry-instrumentation-genai-langchain] Propagate gen_ai.conversation.id across the LangChain invocation tree #2104

[opentelemetry-instrumentation-genai-langchain] Propagate gen_ai.conversation.id across the LangChain invocation tree

[opentelemetry-instrumentation-genai-langchain] Propagate gen_ai.conversation.id across the LangChain invocation tree #2104

Workflow file for this run

# This action requires that any PR targeting the main branch should add a
# changelog fragment file in a .changelog/ directory under the affected
# package. If a changelog entry is not required, add the "Skip Changelog"
# label to disable this action.
name: changelog
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changelog:
runs-on: cncf-ubuntu-2-8-x86
if: >-
${{
!contains(github.event.pull_request.labels.*.name, 'dependencies') &&
!contains(github.event.pull_request.labels.*.name, 'release') &&
!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')
}}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Fetch base branch
run: git fetch origin ${{ github.base_ref }} --depth=1
- name: Ensure no direct changes to CHANGELOG.md
run: |
if [[ $(git diff --diff-filter=MD --name-only FETCH_HEAD -- '**/CHANGELOG.md') ]]
then
echo "CHANGELOG.md files should not be directly modified."
echo "Please add a changelog fragment file to the affected package's .changelog/ directory instead."
echo "See CONTRIBUTING.md for details."
echo ""
echo "Or add the \"Skip Changelog\" label if this job should be skipped."
false
fi
- name: Check for changelog fragment
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
fragments=$(git diff --diff-filter=A --name-only FETCH_HEAD -- '**/.changelog/*' | grep -v '/\.gitignore$' || true)
if [[ -z "$fragments" ]]; then
echo "No changelog fragment found for this PR."
echo ""
echo "Add a file named <package>/.changelog/${PR_NUMBER}.<type>"
echo "where <type> is one of: added, changed, deprecated, removed, fixed"
echo ""
echo "See CONTRIBUTING.md for details."
echo ""
echo "Or add the \"Skip Changelog\" label if this job should be skipped."
exit 1
fi
invalid=()
while IFS= read -r f; do
base=$(basename "$f")
if [[ ! "$base" =~ ^([0-9]+)\.(added|changed|deprecated|removed|fixed)$ ]]; then
invalid+=("$f (expected <PR_NUMBER>.<type>; type one of added, changed, deprecated, removed, fixed)")
continue
fi
if [[ "${BASH_REMATCH[1]}" != "${PR_NUMBER}" ]]; then
invalid+=("$f (PR number ${BASH_REMATCH[1]} does not match this PR's number ${PR_NUMBER})")
fi
done <<< "$fragments"
if (( ${#invalid[@]} > 0 )); then
echo "Invalid changelog fragment(s):"
for msg in "${invalid[@]}"; do
echo " $msg"
done
exit 1
fi
echo "Found changelog fragment(s):"
echo "$fragments"
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Preview changelogs
run: uv run tox -e changelog-preview