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

Feat performance #145

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

rommelfreddy
Copy link
Contributor

related to #106
fixes #60


i've continued the implementation of the performance tracking and also added the profiling.
Thank you to @barryvdh for doing the base stuff

@rommelfreddy rommelfreddy force-pushed the feat-performance branch 2 times, most recently from b0050ce to eb756d0 Compare August 7, 2024 16:36
@rommelfreddy
Copy link
Contributor Author

hey @indykoning

could you give me a first response on this, please?

I will resolve the conflicts if you are willing to proceed with the merge.

@royduin
Copy link
Member

royduin commented Aug 28, 2024

He's currently with vacation, back next week

private ConfigInterface $config,
private array $excludePatterns = []
) {
$this->excludePatterns = array_merge([
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment here why these are excluded, so if we or others look back at this we can quickly see why

]);

// Start the transaction
$transaction = startTransaction($context);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure. Starting a transaction here won't count towards your Sentry usage and limits right?
Since we'll be executing it every request

Comment on lines +116 to +120
} elseif ($state->getAreaCode() === 'graphql') {
$this->transaction->setOp('graphql');
} else {
$this->transaction->setOp($state->getAreaCode());
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there anything special that needed to happen here? If not we can remove the elseif

Suggested change
} elseif ($state->getAreaCode() === 'graphql') {
$this->transaction->setOp('graphql');
} else {
$this->transaction->setOp($state->getAreaCode());
}
} else {
$this->transaction->setOp($state->getAreaCode());
}

SentrySdk::getCurrentHub()->setSpan($transaction);
}

public function finishTransaction(ResponseInterface|int $statusCode): void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe wrap this in a try/catch as well like captureException so issues when collecting performance metrics can't interfere with rendering the page to a customer

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

Successfully merging this pull request may close these issues.

Performance Monitoring
4 participants