-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Selenium Observability blog #674
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
Conversation
Deploy preview for jovial-austin-42fe02 ready! Built with commit 7fe4dfe https://deploy-preview-674--jovial-austin-42fe02.netlify.app |
|
||
Selenium 3 uses Hub as the coordinator. It receives new session requests and directs them to the appropriate Node. The Node is the remote end that has browser and operating system capabilities. | ||
|
||
Selenium 4 extends this to provide users with a way to set up a full-blown distributed system. Essentially, [Selenium 4](https://www.selenium.dev/documentation/en/grid/grid_4/components_of_a_grid/) splits the Hub into different components with additional enhancements. But the Node’s role remained the same. To ensure the backward compatibility and simplicity of setting up Grid, standalone and hub-node mode are also available in the new Selenium server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Selenium 4 extends this to provide users with a way to set up a full-blown distributed system. Essentially, [Selenium 4](https://www.selenium.dev/documentation/en/grid/grid_4/components_of_a_grid/) splits the Hub into different components with additional enhancements. But the Node’s role remained the same. To ensure the backward compatibility and simplicity of setting up Grid, standalone and hub-node mode are also available in the new Selenium server. | |
Selenium 4 extends this to provide users with a way to set up a full-blown distributed system. Essentially, [Selenium 4](https://www.selenium.dev/documentation/en/grid/grid_4/components_of_a_grid/) splits the Hub into different components with additional enhancements. However, the Node’s role remained the same. To ensure the backward compatibility and simplicity of setting up Grid, standalone and hub-node mode are also available in the new Selenium server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: keep the tense the same throughout the paragraph. Either "split" and "remained" or "splits" and "remains"
categories = ["general"] | ||
+++ | ||
|
||
Selenium server is now power-packed with [Opentelemetry](https://opentelemetry.io/) to help troubleshoot issues and optimize performance. Thus, making the Selenium server observable! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting with "why should I care?" is a nice way to hook people into an article. Perhaps something like...
Diagnosing problems when the Selenium server isn't working has never been easy. With Selenium 4, we've added support for [OpenTelemetry](https://opentelemetry.io/) to help you troubleshoot issues and optimize performance. By making the Selenium server observable, we're putting more power into your hands.
… or something similar?
|
||
### Need for Observability | ||
|
||
Selenium server enables distributed testing. Instead of running the test locally, the tests run on a server that makes “**smart**” decisions to run them on different remote servers. Every such remote server is capable of hosting different types of browsers and browser versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the tests still run locally. The browsers run remotely. I'm not sure how much it matters, given that I suspect people seldom differentiate the two.
|
||
Selenium server enables distributed testing. Instead of running the test locally, the tests run on a server that makes “**smart**” decisions to run them on different remote servers. Every such remote server is capable of hosting different types of browsers and browser versions. | ||
|
||
Selenium 3 uses Hub as the coordinator. It receives new session requests and directs them to the appropriate Node. The Node is the remote end that has browser and operating system capabilities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The Node is the remote end where the browser itself runs"
|
||
Selenium 3 uses Hub as the coordinator. It receives new session requests and directs them to the appropriate Node. The Node is the remote end that has browser and operating system capabilities. | ||
|
||
Selenium 4 extends this to provide users with a way to set up a full-blown distributed system. Essentially, [Selenium 4](https://www.selenium.dev/documentation/en/grid/grid_4/components_of_a_grid/) splits the Hub into different components with additional enhancements. But the Node’s role remained the same. To ensure the backward compatibility and simplicity of setting up Grid, standalone and hub-node mode are also available in the new Selenium server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: keep the tense the same throughout the paragraph. Either "split" and "remained" or "splits" and "remains"
|
||
Now picture running a full-blown distributed Selenium Grid with hundreds of Nodes with different browsers and browser versions. Testing at scale in such an infrastructure will involve large volumes of requests. How can one keep track of these requests? Enter Selenium Observability! | ||
|
||
### How does Selenium provide observability? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please "title case" as if this were a main heading: "How Does Selenium Provide Observability"
Run ``` java -jar selenium-server-4.0.0-<selenium-version>.jar info tracing```. | ||
|
||
It provides detailed and updated instructions to set up Jaeger with the Selenium server. | ||
Visualizing the traces makes it easy to interpret a trace and understand request flow. Now Grid users can effortlessly trace a request, drill down an error or query them to observe what is happening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "drill down into an error"
|
||
Refer to [Selenium Observability](https://www.selenium.dev/documentation/en/grid/grid_4/advanced_features/observability/) for details. | ||
|
||
### Full-stack tracing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full-Stack Tracing
Refer to [Selenium Observability](https://www.selenium.dev/documentation/en/grid/grid_4/advanced_features/observability/) for details. | ||
|
||
### Full-stack tracing | ||
Java client binding supports tracing. Full-stack tracing allows tracing a request from the client to the server and back. Though the client is a single component, the client trace will contain spans that help build the request. It is easier to locate a client-side problem and fix the test if needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Java client binding...
### Full-stack tracing | ||
Java client binding supports tracing. Full-stack tracing allows tracing a request from the client to the server and back. Though the client is a single component, the client trace will contain spans that help build the request. It is easier to locate a client-side problem and fix the test if needed. | ||
|
||
We already saw how the server supports tracing and how to leverage it. For the client-side, add the Opentelemetry dependency to your project setup and add the necessary system properties to export the traces to Jaeger. Refer [RemoteWebdriver client](https://www.selenium.dev/documentation/en/remote_webdriver/remote_webdriver_client/#tracing-client-requests) for detailed instructions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "Refer to"
|
||
We already saw how the server supports tracing and how to leverage it. For the client-side, add the Opentelemetry dependency to your project setup and add the necessary system properties to export the traces to Jaeger. Refer [RemoteWebdriver client](https://www.selenium.dev/documentation/en/remote_webdriver/remote_webdriver_client/#tracing-client-requests) for detailed instructions. | ||
|
||
### Leveraging traces and event-logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leveraging Traces and Event Logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for writing this up, @pujagani. LGTM. Ship it! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @pujagani!
* Selenium Observability blog * Add title case fo headings. Fix tense in few sentences. Update the opening statement. Co-authored-by: Diego Molina <[email protected]> 13e377f
Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
A blog post on Selenium 4's observability feature and resource
Motivation and Context
Selenium 4 introduces observability in form of tracing and event logs. The blog is about discussing the need for observability and how to leverage it in Selenium.
Types of changes
Checklist