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

Why can't I get the data for @ request #81

Open
nbgesion opened this issue May 23, 2024 · 8 comments
Open

Why can't I get the data for @ request #81

nbgesion opened this issue May 23, 2024 · 8 comments

Comments

@nbgesion
Copy link

nbgesion commented May 23, 2024

Why can't I get the data for @request? RequestInfo is Null
That's how I use it.
client.submitException(e);

Copy link

Thanks for reporting this issue. We will get back to you in a while

@niemyjski
Copy link
Member

I'm not sure if a plugin is registered or if it's possible to get access to the request context so that is why it may not be populated. It would probably help to say what frameworks you are using and also dig into the library and take a look. I'm not familiar as this is a community maintained integration.

@nbgesion
Copy link
Author

I'm not sure if a plugin is registered or if it's possible to get access to the request context so that is why it may not be populated. It would probably help to say what frameworks you are using and also dig into the library and take a look. I'm not familiar as this is a community maintained integration.

I Create a New Project.
java11 and pom.xml:
<dependencies> <dependency> <groupId>com.exceptionless</groupId> <artifactId>exceptionless-client</artifactId> <version>0.1.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- EXPLICIT DECLARATION --> <dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>4.9.1</version> </dependency> </dependencies>

Debug:
WX20240530-090950@2x

I Can't Get the RequestInfo.
Please.

@niemyjski
Copy link
Member

@pc9795 Any ideas?

@pc9795
Copy link
Collaborator

pc9795 commented Jun 1, 2024

Let me have a look

@nbgesion
Copy link
Author

nbgesion commented Jun 7, 2024

Let me have a look

what's up?bro.

@nbgesion
Copy link
Author

nbgesion commented Jun 7, 2024

@pc9795 please look at this.
WX20240530-090950@2x

@pc9795
Copy link
Collaborator

pc9795 commented Jun 22, 2024

Hello @nbgesion and thanks for your patience. I was out of the town for a while 🙇

I looked into the issue and I can see you are using

client.submitException(e)

This particular method just submits an error event with an exception and don't know anything about what request has caused this exception. We can see the code here

To get what you want to do we have to do something like this

 client.submitEventWithContext(
        EventPluginContext.builder()
            .event(client.createError().build())
            .context(PluginContext.builder().exception(e).request(request).build())
            .build());

Let me know if it solves your issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants