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

Add Laminas Integration #1990

Merged
merged 18 commits into from
Apr 21, 2023
Merged

Add Laminas Integration #1990

merged 18 commits into from
Apr 21, 2023

Conversation

PROFeNoM
Copy link
Contributor

Description

Adds a Laminas integration. The goal was to capture the overall order of events and their corresponding listeners to understand the flow of execution better.

Since Laminas follows semantic versioning and does not carry a single framework version, the versions tested in this integration correspond to the skeleton application ones.

Readiness checklist

  • (only for Members) Changelog has been added to the release document.
  • Tests added for this feature/bug.

Reviewer checklist

  • Appropriate labels assigned.
  • Milestone is set.
  • Changelog has been added to the release document. For community contributors the reviewer is in charge of this task.

@PROFeNoM PROFeNoM requested a review from bwoebi March 24, 2023 08:40
@PROFeNoM PROFeNoM requested a review from a team as a code owner March 24, 2023 08:40
Comment on lines +79 to +80
$this->integrations[LaminasIntegration::NAME] =
'\DDTrace\Integrations\Laminas\LaminasIntegration';
Copy link
Collaborator

Choose a reason for hiding this comment

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

This shall be removed (you have deferred loading already in integrations.c, that's enough)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we explicit that with a comment in the code somewhere?

Comment on lines +85 to +86
$className = get_class($listener[0]);
$methodName = $listener[1];
Copy link
Collaborator

Choose a reason for hiding this comment

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

$listener is a callable. Probably all uses you've checked are [$class, $method]? But I think this should at least check whether it's actually an array.

(I suppose DDTrace\install_hook should be extended to generally accept any callable, also these written as ["class", "method"] ...)

Comment on lines +79 to +80
$this->integrations[LaminasIntegration::NAME] =
'\DDTrace\Integrations\Laminas\LaminasIntegration';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we explicit that with a comment in the code somewhere?

ext/integrations/integrations.c Show resolved Hide resolved

$rootSpan->meta[Tag::HTTP_METHOD] = $method;
$rootSpan->meta[Tag::HTTP_URL] = Normalizer::urlSanitize($request->getUriString());
$rootSpan->meta['laminas.route.name'] = $routeName;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check the span attributes tag doc I shared with you, I suppose those tags should be http. not laminas.

Copy link
Collaborator

@pierotibou pierotibou left a comment

Choose a reason for hiding this comment

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

Thanks for following up on the feedbacks.

@PROFeNoM PROFeNoM added this to the 0.87.0 milestone Apr 11, 2023
@PROFeNoM PROFeNoM self-assigned this Apr 14, 2023
@pierotibou pierotibou merged commit 90229a7 into master Apr 21, 2023
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.

None yet

3 participants