Skip to content

Conversation

@hmstepanek
Copy link
Contributor

Overview

  • Add trace id ratio based sampler.
  • Add support for partial granularity ratio = full gran ratio + partial gran ratio (when both set to ratio).

@hmstepanek hmstepanek requested a review from a team as a code owner December 3, 2025 00:29
@hmstepanek hmstepanek changed the base branch from main to develop-hybrid-core-tracing December 3, 2025 00:30
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 7 0 0 0.92s
✅ MARKDOWN markdownlint 7 0 0 0 1.33s
✅ PYTHON ruff 958 4 0 0 1.05s
✅ PYTHON ruff-format 958 12 0 0 0.37s
✅ YAML prettier 15 0 0 0 1.48s
✅ YAML v8r 15 0 0 4.61s
✅ YAML yamllint 15 0 0 0.68s

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security

@mergify mergify bot added the tests-failing Tests failing in CI. label Dec 3, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 64.86486% with 39 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop-hybrid-core-tracing@7dad3bb). Learn more about missing BASE report.

Files with missing lines Patch % Lines
newrelic/core/samplers/sampler_proxy.py 48.71% 13 Missing and 7 partials ⚠️
newrelic/core/config.py 75.00% 8 Missing and 3 partials ⚠️
newrelic/config.py 50.00% 8 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##             develop-hybrid-core-tracing    #1597   +/-   ##
==============================================================
  Coverage                               ?   79.90%           
==============================================================
  Files                                  ?      211           
  Lines                                  ?    24586           
  Branches                               ?     3902           
==============================================================
  Hits                                   ?    19646           
  Misses                                 ?     3564           
  Partials                               ?     1376           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

**kwargs,
):
return Tracer(resource=self._resource, instrumentation_library=instrumenting_module_name, *args, **kwargs)
return Tracer(resource=self._resource, instrumentation_library=instrumenting_module_name, **kwargs, *args)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this was some regex gone wrong, but this should probably be changed back

Suggested change
return Tracer(resource=self._resource, instrumentation_library=instrumenting_module_name, **kwargs, *args)
return Tracer(resource=self._resource, instrumentation_library=instrumenting_module_name, *args, **kwargs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Megalinter was complaining but my fix was incorrect. I've adjusted it so hopefully it makes more sense. The *args needs to be moved before resource=....

@hmstepanek hmstepanek requested a review from lrafeei December 5, 2025 16:35
hmstepanek and others added 7 commits December 5, 2025 08:42
* Add more formatting to custom event validatators

* Add streamed responses to converse mock server

* Add streaming fixtures for testing for converse

* Rename other bedrock test files

* Add tests for converse streaming

* Instrument converse streaming

* Move GeneratorProxy adjacent functions to mixin

* Fix checking of supported models

* Reorganize converse error tests

* Port new converse botocore tests to aiobotocore

* Instrument response streaming in aiobotocore converse

* Fix suggestions from code review

* Port in converse changes from strands PR

* Delete commented code

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Add new Redis methods

* Add RedisCluster methods to ignore list
Bumps the github_actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 5.0.1 to 6.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@93cb6ef...1af3b93)

Updates `astral-sh/setup-uv` from 7.1.3 to 7.1.4
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@5a7eac6...1e862df)

Updates `github/codeql-action` from 4.31.3 to 4.31.5
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@014f16e...fdbfb4d)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github_actions
- dependency-name: astral-sh/setup-uv
  dependency-version: 7.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github_actions
- dependency-name: github/codeql-action
  dependency-version: 4.31.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github_actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…Bedrock support (#1580)

* Record the request message as the time the request started for LangChain.

* Tracking the original timestamp of the request for input messages that are
recorded as LlmChatCompletionMessage event types.

* First pass at preserving LlmChatCompletionMessage timestamp for the request
with Bedrock methods.

* the `kwargs` was being mapped directly to the OpenAI client
and having timestamp in there caused a problem. As a quick test,
only add the request timestamp after the wrapped function has been
invoked.

* Moved the request timestamp to its own variable instead of part of kwargs.

* OpenAI async request messages were not being assigned the correct timestamp.

* Trying to improve the passing of the request timestamp through for Bedrock.

* Passing too many parameters.

* Set a default role on input/output messages within LangChain.

* [MegaLinter] Apply linters fixes

* Fix request_timestamp for LlmChatCompletionSummary table

* Fix request_timestamp for LlmChatCompletionSummary table

* [MegaLinter] Apply linters fixes

* Bedrock Converse Streaming Support (#1565)

* Add more formatting to custom event validatators

* Add streamed responses to converse mock server

* Add streaming fixtures for testing for converse

* Rename other bedrock test files

* Add tests for converse streaming

* Instrument converse streaming

* Move GeneratorProxy adjacent functions to mixin

* Fix checking of supported models

* Reorganize converse error tests

* Port new converse botocore tests to aiobotocore

* Instrument response streaming in aiobotocore converse

* Fix suggestions from code review

* Port in converse changes from strands PR

* Delete commented code

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Bedrock Converse Streaming Support (#1565)

* Add more formatting to custom event validatators

* Add streamed responses to converse mock server

* Add streaming fixtures for testing for converse

* Rename other bedrock test files

* Add tests for converse streaming

* Instrument converse streaming

* Move GeneratorProxy adjacent functions to mixin

* Fix checking of supported models

* Reorganize converse error tests

* Port new converse botocore tests to aiobotocore

* Instrument response streaming in aiobotocore converse

* Fix suggestions from code review

* Port in converse changes from strands PR

* Delete commented code

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* [MegaLinter] Apply linters fixes

* request_timestamp is now passed across different method

* Fixed gemini model kwargs issue

* [MegaLinter] Apply linters fixes

* Update tests to validate presence of timestamp/ role and fix bugs in instrumentation.

* Update aiobotocore instrumentation to receive request timestamp.

---------

Co-authored-by: Josh Bonczkowski <[email protected]>
Co-authored-by: sgoel-nr <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Timothy Pansino <[email protected]>
Co-authored-by: Uma Annamalai <[email protected]>
Bumps the github_actions group with 4 updates: [actions/setup-python](https://github.com/actions/setup-python), [docker/metadata-action](https://github.com/docker/metadata-action), [oxsecurity/megalinter](https://github.com/oxsecurity/megalinter) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/setup-python` from 6.0.0 to 6.1.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@e797f83...83679a8)

Updates `docker/metadata-action` from 5.9.0 to 5.10.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@318604b...c299e40)

Updates `oxsecurity/megalinter` from 9.1.0 to 9.2.0
- [Release notes](https://github.com/oxsecurity/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](oxsecurity/megalinter@62c799d...55a59b2)

Updates `github/codeql-action` from 4.31.5 to 4.31.6
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@fdbfb4d...fe4161a)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github_actions
- dependency-name: docker/metadata-action
  dependency-version: 5.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github_actions
- dependency-name: oxsecurity/megalinter
  dependency-version: 9.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github_actions
- dependency-name: github/codeql-action
  dependency-version: 4.31.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github_actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <[email protected]>
@hmstepanek hmstepanek merged commit 02dbb85 into develop-hybrid-core-tracing Dec 8, 2025
6 checks passed
@hmstepanek hmstepanek deleted the add-ratio-sampler branch December 8, 2025 20:50
@mergify mergify bot removed the tests-failing Tests failing in CI. label Dec 8, 2025
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.

6 participants