Skip to content

Conversation

liustve
Copy link
Contributor

@liustve liustve commented Jul 25, 2025

Description of changes:

This PR merges the following commits to release/0.10.x

07d9d0d
b75ef99

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This PR prepares the main branch for the next development cycle by
updating the version to 0.10.0.dev0 and updating the image version to be
scanned to the latest released.

This PR should only be merge when release for version v0.10.0 is
success.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.

---------

Co-authored-by: github-actions <[email protected]>
*Description of changes:*
* Populate the correct `CloudWatchMetrics` in EMF when metrics has empty
dimension list

*Test*
```
{
    "_aws": {
        "Timestamp": 1753139679038,
        "CloudWatchMetrics": [
            {
                "Namespace": "MyApplication1",
                "Metrics": [
                    {
                        "Name": "system_cpu_usage_percent",
                        "Unit": "Percent"
                    },
                    {
                        "Name": "http_request_duration_seconds",
                        "Unit": "Seconds"
                    }
                ]
            }
        ]
    },
    "Version": "1",
    "otel.resource.telemetry.sdk.language": "python",
    "otel.resource.telemetry.sdk.name": "opentelemetry",
    "otel.resource.telemetry.sdk.version": "1.33.1",
    "otel.resource.service.name": "my-service",
    "otel.resource.service.version": "0.1.0",
    "otel.resource.deployment.environment": "production",
    "system_cpu_usage_percent": 0.2,
    "http_request_duration_seconds": {
        "Values": [
            0.39614037455626866,
            0.4866507397084614
        ],
        "Counts": [
            1,
            1
        ],
        "Count": 2,
        "Sum": 0.8848342305738114,
        "Max": 0.4877384525234254,
        "Min": 0.397095778050386
    }
}
```


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
*Description of changes:*

This PR applies temporary patches to address critical bugs in the AWS
Bedrock runtime botocore instrumentation (version 0.54b0) that affect
tool use functionality in non-streaming responses reported in:
strands-agents/sdk-python#488

These changes are temporary patches and should be removed once we
upgrade to `opentelemetry-instrumentation-botocore` version 0.56b0,
which includes official fixes for these issues.

See: 
open-telemetry/opentelemetry-python-contrib#3548
open-telemetry/opentelemetry-python-contrib#3544

*Testing Done*

- Unit tests added
- Validated with Bedrock AgentCore team that fixes work.
- Ran a sample app with Bedrock AgentCore and strands framework and
validated that expected toolUse output is correct:

Before fix:

```
Tool use: {"input": ""}
Tool use: {"input": "{\"input\": 99"}
Tool use: {"input": 999}
Tool use: {"input": 99999}
Tool use: {"input": 9999}
Tool use: {"input": 9999}
Tool use: {"input": ", \"input2"}
Tool use: {"input": "\": 8"}
Tool use: {"input": 888888888888}
Tool use: {"input": 888}
Tool use: {"input": "88}"}
```

After fix:

```
Tool use: {"input": ""}
Tool use: {"input": "{\"in"}
Tool use: {"input": "put\": 9"}
Tool use: {"input": "99"}
Tool use: {"input": "99"}
Tool use: {"input": "99"}
Tool use: {"input": "9999"}
Tool use: {"input": "99999"}
Tool use: {"input": "99"}
Tool use: {"input": ", \"input"}
Tool use: {"input": "2\":"}
Tool use: {"input": " 8"}
Tool use: {"input": "888888"}
Tool use: {"input": "888888888"}
Tool use: {"input": "88}"}
```

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
@liustve liustve requested a review from a team as a code owner July 25, 2025 17:21
@liustve liustve merged commit d9a8663 into release/v0.10.x Jul 25, 2025
13 checks passed
@liustve liustve deleted the 0.10.1_release branch July 25, 2025 18:39
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.

4 participants