Skip to content

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

Merged
merged 3 commits into from
Apr 28, 2021
Merged

Conversation

pujagani
Copy link
Contributor

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

  • Change to the site (I am attaching a screenshot showing the before and after)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

@netlify
Copy link

netlify bot commented Apr 27, 2021

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.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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.

Copy link
Member

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!
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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?
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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

@diemol diemol requested a review from shs96c April 28, 2021 10:53
@diemol diemol requested a review from AutomatedTester April 28, 2021 10:53
Copy link
Member

@shs96c shs96c left a 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! :)

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you, @pujagani!

@diemol diemol merged commit 13e377f into SeleniumHQ:dev Apr 28, 2021
selenium-ci added a commit that referenced this pull request Apr 28, 2021
* 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
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.

4 participants