Skip to content
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

Dapr actor incompability when using ResponseBody observability #256

Open
papabytes opened this issue Sep 30, 2021 · 6 comments
Open

Dapr actor incompability when using ResponseBody observability #256

papabytes opened this issue Sep 30, 2021 · 6 comments
Assignees
Labels
area:telemetry All issues related to telemetry bug Something isn't working request-tracking All issues related to request tracking
Milestone

Comments

@papabytes
Copy link

Describe the bug
After enabling ResponseContent Observability we started receiving error codes from Dapr actors. The only difference we made in our code was adding the following line:

app.UseRequestTracking(trackingOptions =>
{
  trackingOptions.IncludeResponseBody = true;
});

To Reproduce
While configuring tracking middleware, enable the following option:

trackingOptions.IncludeResponseBody = true;

We started seeing the following error stack trace:

Dapr.DaprApiException: error invoke actor method: error finding address for actor type <actor_type> with id <actor_id>
Dapr.DaprApiException:
   at Dapr.Actors.DaprHttpInteractor+<SendAsyncHandleUnsuccessfulResponse>d__19.MoveNext (Dapr.Actors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a686d5d635c0f0e6)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Dapr.Actors.DaprHttpInteractor+<SendAsync>d__16.MoveNext (Dapr.Actors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a686d5d635c0f0e6)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Dapr.Actors.DaprHttpInteractor+<InvokeActorMethodWithRemotingAsync>d__10.MoveNext (Dapr.Actors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a686d5d635c0f0e6)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Dapr.Actors.Communication.Client.ActorRemotingClient+<InvokeAsync>d__5.MoveNext (Dapr.Actors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a686d5d635c0f0e6)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Dapr.Actors.Client.ActorProxy+<InvokeMethodAsync>d__32.MoveNext (Dapr.Actors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a686d5d635c0f0e6)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)~
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Arcus.WebApi.Logging.ExceptionHandlingMiddleware+<Invoke>d__5.MoveNext (Arcus.WebApi.Logging, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null)

Expected behavior
Response bodies should be tracked.

Additional context

  • Version: 2.3.0 and 2.2.2
@tomkerkhove
Copy link
Contributor

I can confirm this is related to Arcus and not Dapr.

Well, Dapr is having issues because of our response logging somehow. (stream not handled correctly?)

@stijnmoreels
Copy link
Member

Some integration test we can set up to reproduce this, then?

@stijnmoreels
Copy link
Member

Something for the web API, I'll move this.

@stijnmoreels stijnmoreels transferred this issue from arcus-azure/arcus.observability Oct 12, 2021
@tomkerkhove
Copy link
Contributor

We can, but it will not be easy as we'll need to integrate Dapr in our tests - https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-actors/dotnet-actors-usage/

@stijnmoreels
Copy link
Member

We can, but it will not be easy as we'll need to integrate Dapr in our tests - https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-actors/dotnet-actors-usage/

Ok, we can try. @papabytes , could you give more info on the used middleware and the order in which they are registered? Also, is this something you want to investigate yourself?

@stijnmoreels stijnmoreels added area:telemetry All issues related to telemetry bug Something isn't working labels Oct 28, 2021
@stijnmoreels stijnmoreels added this to the v1.5.0 milestone Oct 28, 2021
@stijnmoreels stijnmoreels added the request-tracking All issues related to request tracking label Mar 18, 2022
@stijnmoreels stijnmoreels modified the milestones: v1.5.0, v1.6.0 Mar 25, 2022
@stijnmoreels stijnmoreels modified the milestones: v1.6.0, v1.7.0 Jul 20, 2022
@stijnmoreels stijnmoreels modified the milestones: v1.7.0, v1.8.0 Nov 14, 2022
@stijnmoreels stijnmoreels modified the milestones: v1.8.0, v2.0 Jan 12, 2023
@stijnmoreels
Copy link
Member

Prioritizing .NET 8 support, @papabytes. Moving to v2.1.

@stijnmoreels stijnmoreels modified the milestones: v2.0, v2.1.0 Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:telemetry All issues related to telemetry bug Something isn't working request-tracking All issues related to request tracking
Projects
None yet
Development

No branches or pull requests

3 participants