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

Fix diagnose report's Push API key transmission #474

Merged
merged 1 commit into from
Nov 2, 2021
Merged

Conversation

tombruijn
Copy link
Member

The problem

The diagnose report was transmitted without the Push API key as the
api_key query parameter. This caused the reports to not be properly
linked to their parent organizations on AppSignal.com, making it more
difficult to find them back for users.

It also caused the issues described in this server side issue:
https://github.com/appsignal/appsignal-server/issues/7710

The solution

The request to submit the report now includes the api_key query
parameter.

I've moved the report transmission to the DiagnoseTool, because the
AppSignal config is available there, and I didn't want to initialize it
again in the Diagnose CLI class or move it to the Diagnose CLI class, or
fetch it from the Diagnose Tool's generated report. There's no big
design idea behind it, this was just easiest.

I've implemented error handling when the server returned an error code,
because otherwise it would print an ugly backtrace with where the JSON
parsing failed.

This behavior's tests should be implemented in the diagnose tests
submodule when we test the transmitted report as well.

@tombruijn tombruijn added the bug label Oct 29, 2021
@tombruijn tombruijn self-assigned this Oct 29, 2021
@tombruijn tombruijn marked this pull request as ready for review October 29, 2021 13:43
## The problem

The diagnose report was transmitted without the Push API key as the
`api_key` query parameter. This caused the reports to not be properly
linked to their parent organizations on AppSignal.com, making it more
difficult to find them back for users.

It also caused the issues described in this server side issue:
appsignal/appsignal-server#7710

## The solution

The request to submit the report now includes the `api_key` query
parameter.

I've moved the report transmission to the DiagnoseTool, because the
AppSignal config is available there, and I didn't want to initialize it
again in the Diagnose CLI class or move it to the Diagnose CLI class, or
fetch it from the Diagnose Tool's generated report. There's no big
design idea behind it, this was just easiest.

I've implemented error handling when the server returned an error code,
because otherwise it would print an ugly backtrace with where the JSON
parsing failed.

This behavior's tests should be implemented in the diagnose tests
submodule when we test the transmitted report as well.
@backlog-helper
Copy link

backlog-helper bot commented Nov 2, 2021

While performing the daily checks some issues were found with this Pull Request.


New issue guide | Backlog management | Rules | Feedback

@tombruijn tombruijn merged commit 1d3eccc into main Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants