Highlight (highlight.io) · Arazzo Workflow

Highlight Fullstack Error Correlation

Version 1.0.0

Open a session, push a frontend error, then push a backend error keyed to the same session so both group against one replay.

1 workflow 1 source API 1 provider
View Spec View on GitHub ObservabilitySession ReplayError MonitoringAPMLoggingTracingOpenTelemetryOpen SourceFrontend MonitoringFull Stack MonitoringArazzoWorkflows

Provider

highlight-io

Workflows

fullstack-error-correlation
Open a session, then report frontend and backend errors keyed to it.
Runs initializeSession to obtain a session_secure_id, then pushPayload to report a frontend error against the session, then pushBackendPayload to report a backend error for the same project, correlating both to one replay.
3 steps inputs: backendErrors, clientId, clientVersion, environment, firstloadVersion, frontendErrors, organizationVerboseId, projectVerboseId outputs: backendResult, frontendResult, sessionSecureId
1
initializeSession
executePublicGraphMutation
Run the initializeSession GraphQL mutation to open a session and return its session_secure_id for use as the correlation key.
2
pushFrontendError
executePublicGraphMutation
Run the pushPayload GraphQL mutation to report the frontend error against the session.
3
pushBackendError
executePublicGraphMutation
Run the pushBackendPayload GraphQL mutation to report the backend error for the same project, correlating it to the session.

Source API Descriptions

Arazzo Workflow Specification

highlight-io-fullstack-error-correlation-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Highlight Fullstack Error Correlation
  summary: Open a session, push a frontend error, then push a backend error keyed to the same session so both group against one replay.
  description: >-
    A single user-facing failure often surfaces as both a frontend error in the
    browser and a backend error on the server. Highlight ties them together when
    both reference the same session. This workflow performs that correlation over
    the public GraphQL ingestion endpoint: it runs initializeSession to mint a
    session_secure_id, runs pushPayload to report the frontend error against the
    session, then runs pushBackendPayload to report the backend error for the same
    project. Sharing the session secure id across the frontend and backend
    mutations is what lets Highlight group both sides of the failure to one
    replay. Every step spells out its GraphQL request inline so the flow can be
    read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: sessionIngestionApi
  url: ../openapi/highlight-session-ingestion-api-openapi.yml
  type: openapi
workflows:
- workflowId: fullstack-error-correlation
  summary: Open a session, then report frontend and backend errors keyed to it.
  description: >-
    Runs initializeSession to obtain a session_secure_id, then pushPayload to
    report a frontend error against the session, then pushBackendPayload to report
    a backend error for the same project, correlating both to one replay.
  inputs:
    type: object
    required:
    - organizationVerboseId
    - projectVerboseId
    - frontendErrors
    - backendErrors
    properties:
      organizationVerboseId:
        type: string
        description: The Highlight project verbose id used to open the session.
      projectVerboseId:
        type: string
        description: The Highlight project verbose id used for the backend payload.
      clientVersion:
        type: string
        description: The highlight.run client SDK version.
        default: "9.0.0"
      firstloadVersion:
        type: string
        description: The firstload script version.
        default: "9.0.0"
      environment:
        type: string
        description: The deployment environment.
        default: production
      clientId:
        type: string
        description: A stable client identifier for the browser.
        default: ""
      frontendErrors:
        type: array
        description: The array of frontend ErrorObjectInput records.
        items:
          type: object
      backendErrors:
        type: array
        description: The array of backend BackendErrorObjectInput records.
        items:
          type: object
  steps:
  - stepId: initializeSession
    description: >-
      Run the initializeSession GraphQL mutation to open a session and return its
      session_secure_id for use as the correlation key.
    operationId: executePublicGraphMutation
    requestBody:
      contentType: application/json
      payload:
        operationName: initializeSession
        query: >-
          mutation initializeSession($organization_verbose_id: String!,
          $enable_strict_privacy: Boolean!, $client_version: String!,
          $firstload_version: String!, $client_config: String!, $environment:
          String!, $client_id: String!) {
          initializeSession(organization_verbose_id: $organization_verbose_id,
          enable_strict_privacy: $enable_strict_privacy, client_version:
          $client_version, firstload_version: $firstload_version, client_config:
          $client_config, environment: $environment, client_id: $client_id) {
          secure_id project_id } }
        variables:
          organization_verbose_id: $inputs.organizationVerboseId
          enable_strict_privacy: false
          client_version: $inputs.clientVersion
          firstload_version: $inputs.firstloadVersion
          client_config: "{}"
          environment: $inputs.environment
          client_id: $inputs.clientId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.data.initializeSession.secure_id != null
      type: jsonpath
    outputs:
      sessionSecureId: $response.body#/data/initializeSession/secure_id
  - stepId: pushFrontendError
    description: >-
      Run the pushPayload GraphQL mutation to report the frontend error against
      the session.
    operationId: executePublicGraphMutation
    requestBody:
      contentType: application/json
      payload:
        operationName: pushPayload
        query: >-
          mutation pushPayload($session_secure_id: String!, $events:
          ReplayEventsInput!, $messages: String!, $errors: [ErrorObjectInput]!,
          $payload_id: ID) { pushPayload(session_secure_id: $session_secure_id,
          events: $events, messages: $messages, errors: $errors, payload_id:
          $payload_id) }
        variables:
          session_secure_id: $steps.initializeSession.outputs.sessionSecureId
          events: {}
          messages: "[]"
          errors: $inputs.frontendErrors
          payload_id: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      frontendResult: $response.body#/data/pushPayload
  - stepId: pushBackendError
    description: >-
      Run the pushBackendPayload GraphQL mutation to report the backend error for
      the same project, correlating it to the session.
    operationId: executePublicGraphMutation
    requestBody:
      contentType: application/json
      payload:
        operationName: pushBackendPayload
        query: >-
          mutation pushBackendPayload($project_id: String!, $errors:
          [BackendErrorObjectInput]!) { pushBackendPayload(project_id:
          $project_id, errors: $errors) }
        variables:
          project_id: $inputs.projectVerboseId
          errors: $inputs.backendErrors
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      backendResult: $response.body#/data/pushBackendPayload
  outputs:
    sessionSecureId: $steps.initializeSession.outputs.sessionSecureId
    frontendResult: $steps.pushFrontendError.outputs.frontendResult
    backendResult: $steps.pushBackendError.outputs.backendResult