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 support for vaadin web framework #2619

Merged
merged 7 commits into from
Mar 29, 2021
Merged

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Mar 23, 2021

Vaadin relies heavily on javascript which results in completely undescriptive traces as almost every user action results in a javascript rpc call. This pr attempts to improve the situation in following ways

  • set server span name to currently displayed route
  • if route is not available set server span name to name of request handler that accepted the request
  • add spans describing rpc calls

def driver = getWebDriver()
waitForStart(driver)

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS)
Copy link
Member

Choose a reason for hiding this comment

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

I assume this reverts timeouts after waitForStart() - if this is true, can it be moved to the wait method? And is the line below needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved. If by line below you mean driver.get(address.resolve("main").toString()) then it is needed, waitForStart fetches the same page and after it is loaded clears traces, so need to fetch it again. waitForStart clears traces because there is some background activity during the first page load that creates an unpredictable amount of traces.

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment explaining why it's there?

basicSpan(it, 0, getContextPath() + "/*", null)
basicSpan(it, 1, "ApplicationDispatcher.forward", span(0))
}
trace(3, 2) {
Copy link
Member

Choose a reason for hiding this comment

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

Are those other traces significant at all? If it's possible, can you leave a comment explaining what they're representing? (ex. /favicon.ico)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These aren't significant, they are for javascript files. Comment added.

@iNikem iNikem merged commit b999e8a into open-telemetry:main Mar 29, 2021
@laurit laurit deleted the vaadin branch March 29, 2021 17:36
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.

5 participants