question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Service instance to `Invocation`

See original GitHub issue

What kind of issue is this?

  • Question. This issue tracker is not the place for questions. If you want to ask how to do something, or to understand why something isn’t working the way you expect it to, use Stack Overflow. https://stackoverflow.com/questions/tagged/retrofit

  • Bug report. If you’ve found a bug, spend the time to write a failing test. Bugs with tests get fixed. Here’s an example: https://gist.github.com/swankjesse/6608b4713ad80988cdc9

  • Feature Request. Start by telling us what problem you’re trying to solve. Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small.

Since Retrofit supports service interface hierarchies, the method() & arguments() of the Invocation are no more sufficient to distinguish the invocation. A method might be declared in a super class with Retrofit annotations but the subclass is the interface which gets created.

interface Super {
  @GET("/super") fun getSuper()
}

// This interface gets instantiated via Retrofit.create(Sub::class)
interface Sub: Super {
  fun getSuperFallback(error: Throwable) { ... }
}

The primary use case right now is to be able to support/implement Resilience4j’s CircuitBreaker fallback mechanism but there are other library use cases and it might open the door to many others.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
JakeWhartoncommented, May 10, 2022

I think we’ll add both the class and the instance.

0reactions
efemoneycommented, Sep 6, 2022

soft bump ⬆️ @JakeWharton 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Service Invocation - Oracle Help Center
Invocation is the process where an Oracle Marketing product invokes an app to perform a task. The product will retrieve the app's instance...
Read more >
Service invocation overview - Dapr Docs
The Dapr instances discover and communicate with each other. The diagram below is an overview of how Dapr's service invocation works.
Read more >
Service Invocation - an overview | ScienceDirect Topics
It is this service environment that makes it possible to control (a) calls in circuit-switched networks, such as GSM and PSTN/ISDN, and (b)...
Read more >
Service invocation - HCL Product Documentation
The asset-integration-starter project contains a com.example.service.client.ExampleServiceClient class to illustrate the service invocation.
Read more >
Invoking Lambda functions - AWS Documentation
Invoke Lambda functions using various AWS tools and other AWS services. ... page of the Lambda console and choose the function you want...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found