Synthetic Monitoring
Browser monitors, HTTP monitors, synthetic locations.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Where can I see logs from api.info() / api.warn() / api.error() in Synthetic JavaScript steps?

deni
Pro

Hi,

I’m working with Synthetic monitors (Browser / JavaScript steps) and I’m trying to understand where logs generated via JavaScript APIs are actually visible.

In my JavaScript step I’m using:

  • api.info()

  • api.warn()

  • api.error()

What I tried so far

  • DQL

    • fetch dt.synthetic.events
      → Events are returned, but there is no column with the log message from api.info / warn / error.

    • fetch dt.synthetic.detailed_events
      → This returns no data at all for my monitor executions.

  • UI

Questions

  1. Where are the messages from api.info(), api.warn(), and api.error() actually stored?

  2. Are they:

    • available via DQL, and if yes – which entity/table?

    • visible only in a specific UI view?

  3. Is this behavior different for:

    • Browser monitors vs HTTP monitors?

    • Classic Synthetic vs MDA-based Synthetic?

At the moment I can trigger failures and events successfully, but I can’t find the actual log-style messages anywhere, neither in DQL nor in the UI.

Any clarification would be greatly appreciated 🙂

Thanks in advance,
Deni

Dynatrace Integration Engineer at CodeAttest
3 REPLIES 3

Julius_Loman
DynaMight Legend
DynaMight Legend

Besides clickpath replay using the browser extension, I don't think I've seen those anywhere else. But definitely, this is a very good question. Maybe @HannahM knows?

Dynatrace Ambassador | Alanata a.s., Slovakia, Dynatrace Master Partner

As @Julius_Loman mentions, they can be seen during playback in the Classic Recorder.

  1. Where are the messages from api.info(), api.warn(), and api.error() actually stored?

    1. For Browser Monitors, they're stored in the execution logs. Search for [CUSTOM]. 
      Recent logs, ~last hour 
      • Linux: /var/tmp/dynatrace/synthetic/logs
      • Windows: C:\ProgramData\dynatrace\synthetic\temp\synthetic\logs

      Archived logs:

      • Linux: /var/tmp/dynatrace/synthetic/archivedLogs
      • Windows: C:\ProgramData\dynatrace\synthetic\temp\synthetic\archivedLogs

      Log File Format: <tenant_id>-<test_def_id>-<visit_id>-<timestamp>-ch.log

      Execution logs from the logs folder are archived hourly into 1-hour ZIP files in the archivedLogs folder.

  2. Are they:

    • available via DQL, and if yes – which entity/table?

      • it's not available in the next version, but I'm checking with the team if it's planned
    • visible only in a specific UI view?

      • only available in logs currently
  3. Is this behavior different for:

    • Browser monitors vs HTTP monitors?

      • Yes, for HTTP monitors, it's already available in events, custom_logs, and the UI
    • Classic Synthetic vs MDA-based Synthetic?

      • For HTTP Monitors, custom logs are available in both Classic Synthetic and the Synthetic App. 
Synthetic SME and community advocate.

Along these lines, I'd like to be able to ingest the execution logs from my public synthetics as well as private. My private synthetic ActiveGates have OneAgents installed on them so I can ingest any of the logs I wish. However the public synthetics (which is the bulk of what we use) I don't have access to the logs.

Observability Engineer at FreedomPay

Featured Posts