-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XRAY batch_get_traces pagination does not work #3924
Comments
Hi @harrisonbarlow thanks for reaching out. I could reproduce the error you referenced. The batch_get_traces command corresponds to the X-Ray BatchGetTraces API, so we'll need to reach out to the X-Ray team to understand what's going on here. As an alternative, have you tried using the paginator? For example: import boto3
client = boto3.client('xray')
paginator = client.get_paginator('batch_get_traces')
page_iterator = paginator.paginate(
TraceIds=['1-5759e988-bd862e3fe1be46a994272793']
)
for page in page_iterator:
print(page) |
Hi @tim-finnigan thanks for your reply. I did attempt to use the paginator as a workaround, however this produces the No problem! Interested to hear how you go. |
Thanks for following up - I will also ask the service team about their paginator model and if this relates to the |
|
Describe the bug
Passing more than 5 trace IDs to
client.batch_get_traces
produces an errorbotocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException) when calling the BatchGetTraces operation: Exceeding maximum query size: 5
As per the documentation, a
NextToken
can be supplied toclient.batch_get_traces
in order to paginate the request.However, attempting this gives the error
botocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException) when calling the BatchGetTraces operation: NextToken is currently not supported
I am using:
Python=3.7.17
boto3=1.28.80
botocore=1.31.80
Am I doing something wrong?
Expected Behavior
To simply receive a NextToken in the body of the request in order to paginate the results, as is currently the case with
client.get_trace_summaries
(which works as expected)Current Behavior
Attempting to supply a NextToken produces an error which says that it is unsupported, which conflicts with the documentation.
Reproduction Steps
Call client.batch_get_traces with a list of trace ID, and an empty NextToken
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.28.80
Environment details (OS name and version, etc.)
MacOS, running in a Python container.
The text was updated successfully, but these errors were encountered: