Skip to content

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

Closed

Description

@nbgesion

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

Activity

  1. github-actions commented on May 23, 2024

    @github-actions

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

  2. niemyjski commented on May 24, 2024

    @niemyjski
    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.

  3. nbgesion commented on May 30, 2024

    @nbgesion
    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.

  4. niemyjski commented on May 30, 2024

    @niemyjski
    Member

    @pc9795 Any ideas?

  5. pc9795 commented on Jun 1, 2024

    @pc9795
    Collaborator

    Let me have a look

  6. nbgesion commented on Jun 7, 2024

    @nbgesion
    Author

    Let me have a look

    what's up?bro.

  7. nbgesion commented on Jun 7, 2024

    @nbgesion
    Author

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

  8. pc9795 commented on Jun 22, 2024

    @pc9795
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions