By using AWS re:Post, you agree to the Terms of Use

Questions tagged with Developer Tools

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

X-Ray trace doesn't shows inner method call in springboot app

I'm new to aws x-ray and trying to use x-ray with AOP based approach in a springboot application. I was able to get the traces in the aws console, but traces doesn't show inner method call method2() details. Am I missing anything here ? **Controller class ** ``` import com.amazonaws.xray.spring.aop.XRayEnabled; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/xray") @XRayEnabled public class XrayController { @GetMapping(value = "/method1") public String method1() { return method2(); } public String method2() { return "Hello"; } } ``` **Aspect Class** ``` import com.amazonaws.xray.entities.Subsegment; import com.amazonaws.xray.spring.aop.BaseAbstractXRayInterceptor; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.springframework.stereotype.Component; import java.util.Map; @Aspect @Component public class XRayInspector extends BaseAbstractXRayInterceptor { @Override protected Map<String, Map<String, Object>> generateMetadata(ProceedingJoinPoint proceedingJoinPoint, Subsegment subsegment) { return super.generateMetadata(proceedingJoinPoint, subsegment); } @Override @Pointcut("@within(com.amazonaws.xray.spring.aop.XRayEnabled) && (bean(*Controller) || bean(*Service) || bean(*Client) || bean(*Mapper))") public void xrayEnabledClasses() {} } ``` When I hit http://localhost:8080/xray/method1 endpoint, AWS Xray Console doesn't show method2() details ![Enter image description here](https://repost.aws/media/postImages/original/IM77lOgIsWSGyNuiuhOOxsqw)
1
answers
0
votes
81
views
asked 2 months ago

Can't start or stop streaming session with Nimble Studio API

I'm trying to automate the start and stop of a streaming session using AWS Nimble Studio API. I'm using Python Boto3 API, and although I got the expected result using other Nimble API methods, start_streaming_session() and stop_streaming_session() respond with "Unknown error parsing request body". At this point, I have no idea what I am doing wrong. I've tried to use AWS CLI, and the outcome is the same. I used my account admin IAM user credentials with the Admin Access policy attached. Here are the logs. I've replaced sensitive information with placeholders. [nimble_studio_logs.txt](https://github.com/boto/boto3/files/9226672/nimble_studio_logs.txt) And here is the script I'm using : ```import boto3 boto3.set_stream_logger('') session = boto3.Session(aws_access_key_id='my-admin-key', aws_secret_access_key='my-admin-secret-key') nimble_client = session.client('nimble', region_name = 'eu-west-2') studio_id = nimble_client.list_studios()['studios'][0]['studioId'] sessions = nimble_client.list_streaming_sessions(studioId=studio_id)['sessions'] for session in sessions: if session['state'] == "STOPPED" and \ session['tags']['aws:nimble:createdWithLaunchProfile'] == 'my-launch-profile-id': the_session = session if the_session: response = nimble_client.get_streaming_session(sessionId=the_session['sessionId'],studioId=studio_id) response = nimble_client.start_streaming_session(sessionId=the_session['sessionId'],studioId=studio_id)```
1
answers
0
votes
86
views
asked 2 months ago