rollbar / rollbar-php-symfony-bundle

Bundle for Symfony that integrates Rollbar tracker
MIT License
28 stars 25 forks source link

Default affected People does not work for Symfony 6 (private Services) #91

Open Chris53897 opened 1 year ago

Chris53897 commented 1 year ago

The default person_fn does not work for me. I use Symfony 6.2, version 4 of this repo. Over my PR. But i am not sure if i am doing anything wrong, or at which point is does not work.

https://docs.rollbar.com/docs/person-tracking https://docs.rollbar.com/docs/symfony#person_fn-configuration-option

The field: body.extra.token.user_identifier is set correcty in the Item-Report in Rollbar. But Rollbar does not seems to understand, that this is the user.

@danielmorell Maybe you can have a look?

danielmorell commented 1 year ago

Sorry for the long wait on this one @Chris53897!

Can you help me understand where you are seeing the body.extra.token.user_identifier field. Is that the raw JSON in the Rollbar platform?

I believe the raw JSON should look more like this...

{
    "body": {
        // Stuff...
    },
    "person": {
        "id": "<some id>",
        "username": "<username>",
        "email": "<email>",
    }
}

The default person function is found here https://github.com/rollbar/rollbar-php-symfony-bundle/blob/master/Factories/RollbarHandlerFactory.php for Rollbar Symfony.

Chris53897 commented 1 year ago

@danielmorell Thanks for reply. The field body.extra.token.user_identifier field was my username (as plain string) I will have a look as soon if i found some free time.

Chris53897 commented 1 year ago

I opened this Issue on the wrong repo. Could be moved to https://github.com/rollbar/rollbar-php-symfony-bundle/issues

ghost commented 1 year ago

I'll close this issue, as it's in a wrong repo.

Chris53897 commented 1 year ago

@rollbar-bborsits ? It was already moved 4 days ago to this (correct) Repo. Please reopen

ghost commented 1 year ago

@Chris53897 Apology, I mixed up the repos. You're right, so I reopened it.

Chris53897 commented 1 year ago

thanks