RousselTMLEARNING

TP · Dynatrace: From Discovery to Expertise

Lab - Synthetic Monitoring

What you will learn in this TP
  • Access the Dynatrace SaaS environment
  • Understand how Synthetic Monitoring works overall
  • Differentiate an HTTP Monitor from a Browser Monitor
  • Choose the monitor type suited to the use case
  • Understand the value of public and private locations
  • Analyze an existing monitor's configuration
  • Identify the key metrics (frequency, locations, type, steps)
  • Display the list of existing locations
  • Understand the process to add a private location
  • Master the Credential Vault to secure credentials
  • Create a multi-step HTTP monitor
  • Configure status code and content validations
  • Set specific execution parameters (location and frequency)
  • Install and configure the Dynatrace Synthetic Recorder
  • Record a full user journey
  • Validate that a clickpath works correctly

Prerequisites and connection #

What you will learn in this section
  • Access the Dynatrace SaaS environment
  • Understand how Synthetic Monitoring works overall
Critical prerequisite: before starting this lab, you must have read this article.
For this lab, we'll use the dedicated SaaS platform. Connect to the following address: https://playground.dynatrace.rousseltm.fr.
Please reach out to your instructor for the login credentials.
  1. Introducing Synthetic Monitoring

    What is Synthetic Monitoring and what's its main purpose?

HTTP Monitor versus Browser Monitor #

What you will learn in this section
  • Differentiate an HTTP Monitor from a Browser Monitor
  • Choose the monitor type suited to the use case

Dynatrace offers two main types of synthetic monitors. It's crucial to pick the right tool depending on your need.

  1. Key differences

    What's the fundamental difference between an HTTP Monitor and a Browser Monitor?

  2. Billing (Synthetic actions)

    How is billing calculated for these two monitor types in Dynatrace?

Remote Locations #

What you will learn in this section
  • Understand the value of public and private locations

One strength of Synthetic Monitoring is being able to test the application from different geographic areas to check the impact of network latency.

  1. Why use remote locations?

    In the monitor creation interface (Synthetic > Create a synthetic monitor), you're asked to choose 'Locations'. What's the point?

Analyzing a scenario #

What you will learn in this section
  • Analyze an existing monitor's configuration
  • Identify the key metrics (frequency, locations, type, steps)

Now that you understand the concepts, let's put them into practice by analyzing existing synthetic monitors in the demo environment. The following two scenarios exist in the console; you need to find them:

  1. Dynatrace website

    For this scenario, identify:
    - The scenario type
    - The availability rate
    - The execution frequency
    - The number of steps
    - The number of locations
    - The location of the ActiveGates running the tests
  2. Astroshop Core API Endpoints

    Now look for the monitor named Astroshop Core API Endpoints. As before, identify:
    - The scenario type
    - The availability rate
    - The execution frequency
    - The number of steps
    - The number of locations

Managing locations #

What you will learn in this section
  • Display the list of existing locations
  • Understand the process to add a private location

In this section, we'll see how to manage locations in Dynatrace, which will then serve as starting points for your synthetic monitors.

  1. Viewing locations

    How do you view the list of public and private locations configured on your Dynatrace cluster?

    View locations
  2. Adding a location

    How do you add a new private location so you can run tests from your own internal network?

    Note: the targeted ActiveGate must have been installed with the 'Synthetic' capability enabled. Once the ActiveGate is assigned and recognized by the system, this new location will appear in the list of choices when creating a scenario.
    Add locations

Setting up an HTTP scenario #

What you will learn in this section
  • Master the Credential Vault to secure credentials
  • Create a multi-step HTTP monitor
  • Configure status code and content validations
  • Set specific execution parameters (location and frequency)
This section guides you through creating a complex HTTP monitor on the SaaS platform https://demo.dynatrace.rousseltm.fr/.
Note: remember to use your name when creating each component (e.g. name_credential, name_monitor) so participants can tell their resources apart on the shared environment.
Warning: the reqres.in API enforces call-rate limits. You may see the error "rate_limit_exceeded" in your JSON output if you run too many tests in a short time.
  1. Creating a secure account

    Secure the credentials in the vault. Create a token with the value reqres_8d849a2d1091451e8cec7154abc5a97c for our scenario.
    Note: if this token has expired, feel free to generate a new one to continue the lab.
  2. Initializing the scenario

    Start configuring the monitor.

  3. Adding the 'User list' step

    Configure the first API request. The step must point to the URL https://reqres.in/api/users with the GET method, use the previous token via the x-api-key header, and trigger an error if the response body contains "error" or its status code is >= 400.
  4. Setting frequency and locations

    Time-based settings (every 5 minutes) and geographic settings from Paris (Azure) and Sydney (GCP).

  5. Extracting data via JavaScript

    Chaining steps lets you pass along dynamic data. Without it, the value of multi-step monitors is limited. Add a JavaScript script (Post-execution script) to extract the ID of the second element of the 'data' array:
    // 1. Check the HTTP status code
    if (response.getStatusCode() != 200) {
        api.fail("HTTP error: " + response.getStatusCode());
    }
    
    var responseBody = response.getResponseBody();
    var jsonData = JSON.parse(responseBody);
    
    // 2. Safety check: make sure "data" exists, is an array and has at least 2 elements
    if (jsonData && jsonData.data && Array.isArray(jsonData.data) && jsonData.data.length > 1) {
        
        var userIdValue = jsonData.data[1].id;
        
        // 3. Must convert to String to inject it into the Dynatrace context
        api.setValue("userid", userIdValue.toString());
        
        // 4. Log it in Dynatrace's execution logs
        api.info("Extracted user ID: " + userIdValue);
    
    } else {
        api.fail("Parsing error: the JSON doesn't contain the expected second element in 'data'.");
    }
  6. Open in Notebooks

    To debug your scripts or see the detail of the HTTP exchanges, Dynatrace lets you send a monitor's execution to a Notebook. Create and send your request to a new Notebook named formation-synthetic-YOUR_NAME to see the detailed step outputs. Very useful when troubleshooting.
  7. Final step: using the variable

    A dynamic call based on the previous extraction. Add a test of the URL https://reqres.in/api/users/[user id retrieved in the previous step] and check that the output contains the text 'Become a better CTO'.

Setting up a Browser scenario #

What you will learn in this section
  • Install and configure the Dynatrace Synthetic Recorder
  • Record a full user journey
  • Validate that a clickpath works correctly

This section guides you through creating a complex user scenario (Clickpath) using the Dynatrace browser extension.

  1. Installing the extension

    To easily record your clicks and navigation, install the Dynatrace Synthetic Recorder extension, available on the Chrome Web Store or Microsoft Edge Add-ons.
  2. Incognito mode

    It's strongly recommended to allow the extension to run in Incognito mode. This lets you record your tests in a clean environment, with no cookies or pre-existing sessions that could skew the robot's behavior.

    Incognito extension
  3. Recording the steps

    Start recording with the extension and perform the following actions:
    • Open the URL: https://elearning.rousseltm.fr
    • Click the Categories menu
    • Click the View button on the Observability category
    • In the course list, click View on the Dynatrace course
    • In the section list, click Dynatrace Architecture
    • Start playing the video
    Once done, stop the recording and upload the scenario to your Dynatrace console.

Difficulty level : ●●●○○ (3/5)

My progress

  • ⏱ Estimated time : ≈ 2 h 06

Sign in to track your progress and take notes. Sign in

💬 Ask a question

Course Glossary

AIOps (Artificial Intelligence for IT Operations)

The use of artificial intelligence and machine learning to automate and improve IT operations (e.g., anomaly detection, reducing alert noise).

OpenTelemetry

An open source framework providing standards, APIs, and SDKs to collect and export observability data (traces, metrics, logs) in an agnostic way.

Recommended Articles

Dynatrace Synthetic Monitoring : Guide complet et bonnes pratiques

Découvrez comment utiliser le Synthetic Monitoring de Dynatrace pour surveiller proactivement vos...

Synthetic Monitoring as Code : Industrialisez la gestion des scénarios synthétiques

Découvrez comment intégrer le Synthetic Monitoring dans vos pipelines CI/CD pour des tests de per...

Dynatrace Credential Vault : Sécuriser et gérer vos secrets

Découvrez comment l'application Credential Vault de Dynatrace permet de gérer de manière sécurisé...

RUM et Synthetic Monitoring avec Datadog : synthetic transaction monitoring et expérience utilisateur

Mesurer l'expérience utilisateur avec Datadog : RUM navigateur et mobile, Core Web Vitals, Sessio...

Real User Monitoring Dynatrace : injection, applications web et vérification

Mettre en place la surveillance des utilisateurs réels dans Dynatrace : injection automatique par...

Monitoring de site web : disponibilité, surveillance HTTPS, certificats et performances

Mettre en place le monitoring d'un site web : surveillance de la disponibilité et du HTTPS, expir...

Dynatrace vs Datadog : Le duel des leaders de l'APM

Comparatif complet entre les deux géants de l'observabilité. Automatisation par IA contre flexibi...

Guide des Bonnes Pratiques Dynatrace : Vers une Observabilité Mature

Optimisez votre plateforme Dynatrace grâce à nos recommandations d'experts : automatisation du ta...

Release monitoring dans Dynatrace : versions, événements de déploiement et suivi des incidents

Suivre les versions déployées dans Dynatrace : variables DT_RELEASE, labels Kubernetes, événement...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!