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

Logs grouping not working #3019

Open
Rishabhg71 opened this issue Apr 25, 2024 · 1 comment
Open

Logs grouping not working #3019

Rishabhg71 opened this issue Apr 25, 2024 · 1 comment

Comments

@Rishabhg71
Copy link

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.45.0

Steps to Reproduce

I want to send all the logs from my local logger to the sentry and these logs should be grouped by endpoint. This is the test endpoint that I am using right now. I am using a scope and the same fingerprint to group these logs together but in the console, I am getting all the logs as individual events instead of a group.

@app.get("/test")
async def trigger_error_by_f():
    with push_scope() as scope:
        scope.set_tag("my-tag", "my value")
        scope.set_level("debug")
        scope.set_user({"id": "evvee"})
        scope.fingerprint = ["event2"]
        scope.add_breadcrumb()

        logger.debug("DEBUG")
        logger.warning("WARNING 1")
        logger.warning("WARNING 2")
        logger.warning("WARNING 3")
        logger.warning("WARNING 4")

Could It be that I am doing something wrong here, My goal is to group logs for every endpoint (error or success) by endpoint/user_id

Expected Result

I should get all 5 of these logs in a single event like this
image

Actual Result

but I am getting multiple events where only one event from this contains all logs as expected
image

@szokeasaurusrex
Copy link
Member

Hey @Rishabhg71, I am having trouble reproducing your problem. I attempted to reproduce it here, but I am only observing the expected behavior.

I will need some more information about your setup in order to reproduce this problem. First of all, I would need to see how you are initializing the Sentry SDK, i.e., your sentry_sdk.init(...) call. If you can share your full source code, or at least a minimal reproduction, that would be even better! You can open a PR with your reproduction on my reproduction repository or you can link/paste it on the issue, whichever is easier for you!

Also, on which Sentry pages did you take the screenshots in your issue? It would be helpful to know the context of these pages. If you are using SaaS (sentry.io), it would be even better if you can share a link to the exact page.

Thanks in advance!

P.S. Here are the docs for our logging integration, perhaps they might help you figure out the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

2 participants