Skip to content

fix: pin opentelemetry-instrumentation-langchain and add telemetry integration tests#143

Merged
LucasAlvesSoares merged 23 commits into
mainfrom
telemetry-integration-tests
Jun 8, 2026
Merged

fix: pin opentelemetry-instrumentation-langchain and add telemetry integration tests#143
LucasAlvesSoares merged 23 commits into
mainfrom
telemetry-integration-tests

Conversation

@LucasAlvesSoares

@LucasAlvesSoares LucasAlvesSoares commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Description

Added integration tests for the telemetry module. Tests add a second exporter (in-mem) to autoinstrumentation, so that whatever goes inside can be verified and cleaned for other tests later on. It also adds a test agent that triggers auto_instrument in order to try and replicate what happens In a real-world scenario. BDD scenarios then focus on specifying parent-child relationships in traces and required attributes.
It required a change in the CI because, since we use the AICORE_* pattern from set_aicore_config(), we need to be able to inject env vars from secrets using that pattern.
Also bumped opentelemetry-instrumentation-langchain to >= 0.61.0 for compatibility and bumped PyJWT to fix a security issue.

Type of Change

Please check the relevant option:

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Dependency update

How to Test

Describe how reviewers can test your changes:

  1. Integration tests — run all tests:
    uv run pytest tests/core/integration/telemetry -v

Checklist

Before submitting your PR, please review and check the following:

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

@cassiofariasmachado cassiofariasmachado left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work so far!

Comment thread tests/core/integration/telemetry/telemetry.feature
@LucasAlvesSoares LucasAlvesSoares marked this pull request as ready for review June 5, 2026 17:37
@LucasAlvesSoares LucasAlvesSoares requested a review from a team as a code owner June 5, 2026 17:37
The old lock file had a corrupted importlib-metadata entry that caused
uv to fail with "missing source field but has more than one matching package".
Lift State TypedDict to module level so ty can see it satisfies
StateGraph's type bound. Remove now-stale ignore comments in DMS tests.
ty cannot verify that TypedDict subclasses satisfy the TypedDictLikeV1
protocol, causing a false positive. Switching to a dataclass satisfies
the DataclassLike protocol bound that ty can check statically.
@LucasAlvesSoares LucasAlvesSoares changed the title test: telemetry integration tests fix: pin opentelemetry-instrumentation-langchain and add telemetry integration tests Jun 5, 2026

@cassiofariasmachado cassiofariasmachado left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a friendly reminder: descriptions help reviewers 😅

@LucasAlvesSoares LucasAlvesSoares merged commit b5ac77f into main Jun 8, 2026
10 of 11 checks passed
@LucasAlvesSoares LucasAlvesSoares deleted the telemetry-integration-tests branch June 8, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants