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

Questions tagged with AWS X-Ray

Sort by most recent

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

Not receiving traces sent by DAPR + Opentelmetry Xray exporter setup

To collect traces from DAPR we are using Opentelemetry collector and using Zipkin receiver since that's supported by DAPR and using awsxray exporter in open telemetry configuration. We see the traces generated in Opentelemetry log, however we do not see traces collected in AWS Xray. Please let us know what could be the issue Open telemetry configuration: receivers: zipkin: endpoint: 0.0.0.0:9411 otlp: protocols: grpc: endpoint: 0.0.0.0:4317 http: endpoint: 0.0.0.0:4318 awsxray: awsxray/udp_endpoint: endpoint: "0.0.0.0:5678" transport: udp awsxray/proxy_server: proxy_server: endpoint: "0.0.0.0:1234" tls: insecure: true region: ap-south-1 Exporter configuration: awsxray: region: ap-south-1 index_all_attributes: true resource_arn: "arn:aws:iam::215977048474:role/EKS-NodeGroup" #role_arn: "arn:aws:iam::215977048474:role/MastBazaar-EKS" no_verify_ssl: true Service configuration: service: extensions: [pprof, zpages, health_check] pipelines: traces: receivers: [zipkin] # List your exporter here. exporters: [awsxray,logging] Also added environment variable OTEL_PROPAGATORS: "xray" in deployment as seen below containers: - name: otel-collector image: otel/opentelemetry-collector-contrib-dev:latest env: - name: OTEL_PROPAGATORS value: "xray" Sample log in open telemetry 2022-09-13T18:15:46.106Z INFO loggingexporter/logging_exporter.go:42 TracesExporter {"#spans": 1} 2022-09-13T18:15:46.106Z DEBUG loggingexporter/logging_exporter.go:51 ResourceSpans #0 Resource SchemaURL: Resource labels: -> service.name: STRING(multiplyapp) ScopeSpans #0 ScopeSpans SchemaURL: InstrumentationScope Span #0 Trace ID : 5db6a8eb0ade84a251ca547034b13c5f Parent ID : 9987294085d81f24 ID : f88d24f02301bf28 Name : CallLocal/multiplyapp/multiply Kind : SPAN_KIND_SERVER Start time : 2022-09-13 18:15:44.031751 +0000 UTC End time : 2022-09-13 18:15:45.034974 +0000 UTC Status code : STATUS_CODE_UNSET Status message : Attributes: -> dapr.api: STRING(/dapr.proto.internals.v1.ServiceInvocation/CallLocal) -> dapr.invoke_method: STRING(multiply) -> dapr.protocol: STRING(grpc) -> rpc.service: STRING(ServiceInvocation) -> net.host.ip: STRING(10.0.195.115) 2022-09-13T18:15:54.505Z INFO loggingexporter/logging_exporter.go:42 TracesExporter {"#spans": 1} 2022-09-13T18:15:54.505Z DEBUG loggingexporter/logging_exporter.go:51 ResourceSpans #0 Resource SchemaURL: Resource labels: -> service.name: STRING(multiplyapp) ScopeSpans #0 ScopeSpans SchemaURL: InstrumentationScope Span #0 Trace ID : c3f98c14589d4618899f4581503e4c3f Parent ID : 642dd665bbc6c3dd ID : 014fec0dfb862b5c Name : CallLocal/multiplyapp/multiply Kind : SPAN_KIND_SERVER Start time : 2022-09-13 18:15:53.489635 +0000 UTC End time : 2022-09-13 18:15:54.492579 +0000 UTC Status code : STATUS_CODE_UNSET Status message : Attributes: -> dapr.api: STRING(/dapr.proto.internals.v1.ServiceInvocation/CallLocal) -> dapr.invoke_method: STRING(multiply) -> dapr.protocol: STRING(grpc) -> rpc.service: STRING(ServiceInvocation) -> net.host.ip: STRING(10.0.195.115) Any guidance will be very much appreciated
0
answers
0
votes
16
views
asked 12 days ago
1
answers
0
votes
71
views
asked 14 days ago

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
75
views
asked 2 months ago

How to solve "Entity doesn't exist in callcontext" exception in .Net console/library applications

Hi guys, I am trying to add AWS X-Ray to our solution which includes S3, Lambda and DynamoDB services, but I am struggling with the exception "Entity doesn't exist in callcontext". Normally, I would need the X-Ray service in a library project started via WCF webservice file (.svc), but in order to break down the problem I tried it in a simple console application having following minimum sample code and exactly the same error occurs: ``` private static void Main(string[] args) { AWSSDKHandler.RegisterXRayForAllServices(); var lambdaClient = new AmazonLambdaClient(awsCredentials, regionEndpoint); lambdaClient.Invoke(new InvokeRequest { ... }); } ``` When disabling line *RegisterXRayForAllServices* lambda request is working, when enabling the line, following exception is thrown when invoking the lambda request: ``` at Amazon.XRay.Recorder.Core.Internal.Context.CallContextContainer.GetEntity() at Amazon.XRay.Recorder.Handlers.AwsSdk.Internal.XRayPipelineHandler.ProcessBeginRequest(IExecutionContext executionContext) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Amazon.XRay.Recorder.Handlers.AwsSdk.Internal.XRayPipelineHandler.ProcessBeginRequest(IExecutionContext executionContext) at Amazon.XRay.Recorder.Handlers.AwsSdk.Internal.XRayPipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext) in D:\JenkinsWorkspaces\trebuchet-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\CallbackHandler.cs:line 46 at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeSync(IExecutionContext executionContext) in D:\JenkinsWorkspaces\trebuchet-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\ErrorCallbackHandler.cs:line 44 at Amazon.Runtime.Internal.MetricsHandler.InvokeSync(IExecutionContext executionContext) in D:\JenkinsWorkspaces\trebuchet-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\Handlers\MetricsHandler.cs:line 40 at Amazon.Runtime.Internal.RuntimePipeline.InvokeSync(IExecutionContext executionContext) in D:\JenkinsWorkspaces\trebuchet-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\RuntimePipeline.cs:line 136 at Amazon.Runtime.AmazonServiceClient.Invoke[TResponse](AmazonWebServiceRequest request, InvokeOptionsBase options) in D:\JenkinsWorkspaces\trebuchet-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\AmazonServiceClient.cs:line 206 at Program.Main(String[] args) in Program.cs:line 42 ``` Versions in use: * .Net Framework 4.7.2 * Nuget AWSDDK.Lambda 3.7.13.16 * Nuget AWSXRayRecoder: 2.10.1 In other projects without AWS services I do not have problems with *RegisterXRay(this, "Program")* and adding own segments and custom endpoints behaviors for WCF services, but here I would need some help, how to correctly setup the XRay recorder for AWS services. Is there anything additionally required in App.config/Web.config? Thank you and BR Fabian
2
answers
0
votes
77
views
asked 3 months ago