Highlight (highlight.io) · Arazzo Workflow

Highlight Session Track Event

Version 1.0.0

Open a session, attach track-event properties to it, then flush a recording payload.

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

Provider

highlight-io

Workflows

session-track-event
Initialize a session, record a track event, and flush its recording payload.
Runs initializeSession to obtain a session_secure_id, then addTrackProperties to record a named track event with properties, then pushPayload to flush the recorded events so the event lands on the session timeline.
3 steps inputs: clientId, clientVersion, environment, events, firstloadVersion, messages, organizationVerboseId, trackProperties outputs: payloadResult, sessionSecureId, trackResult
1
initializeSession
executePublicGraphMutation
Run the initializeSession GraphQL mutation to open a session and return its session_secure_id.
2
addTrackProperties
executePublicGraphMutation
Run the addTrackProperties GraphQL mutation to record a named track event and its property map against the session.
3
flushPayload
executePublicGraphMutation
Run the pushPayload GraphQL mutation to flush the recorded events so the track event lands on the session timeline.

Source API Descriptions

Arazzo Workflow Specification

highlight-io-session-track-event-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Highlight Session Track Event
  summary: Open a session, attach track-event properties to it, then flush a recording payload.
  description: >-
    Product analytics events in Highlight session replay are sent with the
    addTrackProperties mutation, which records a named event and its properties
    against an open session, and they show up on the session timeline. This
    workflow exercises that path over the single GraphQL ingestion endpoint: it
    runs initializeSession to mint a session_secure_id, runs addTrackProperties to
    record a track event with its property map, then runs pushPayload to flush the
    accompanying recorded events so the track event lands on the replay timeline.
    Both later mutations require the secure id from initialize, so the steps are
    genuinely chained. 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: session-track-event
  summary: Initialize a session, record a track event, and flush its recording payload.
  description: >-
    Runs initializeSession to obtain a session_secure_id, then addTrackProperties
    to record a named track event with properties, then pushPayload to flush the
    recorded events so the event lands on the session timeline.
  inputs:
    type: object
    required:
    - organizationVerboseId
    - trackProperties
    properties:
      organizationVerboseId:
        type: string
        description: The Highlight project verbose id that owns the session.
      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: ""
      trackProperties:
        type: object
        description: The track event property map (should include the event name and its attributes).
      events:
        type: object
        description: The rrweb events object flushed with the final payload.
        default: {}
      messages:
        type: string
        description: Serialized console/network messages flushed with the final payload.
        default: "[]"
  steps:
  - stepId: initializeSession
    description: >-
      Run the initializeSession GraphQL mutation to open a session and return its
      session_secure_id.
    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: addTrackProperties
    description: >-
      Run the addTrackProperties GraphQL mutation to record a named track event
      and its property map against the session.
    operationId: executePublicGraphMutation
    requestBody:
      contentType: application/json
      payload:
        operationName: addTrackProperties
        query: >-
          mutation addTrackProperties($session_secure_id: String!,
          $properties_object: Any) { addTrackProperties(session_secure_id:
          $session_secure_id, properties_object: $properties_object) }
        variables:
          session_secure_id: $steps.initializeSession.outputs.sessionSecureId
          properties_object: $inputs.trackProperties
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      trackResult: $response.body#/data/addTrackProperties
  - stepId: flushPayload
    description: >-
      Run the pushPayload GraphQL mutation to flush the recorded events so the
      track event lands on the session timeline.
    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: $inputs.events
          messages: $inputs.messages
          errors: []
          payload_id: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      payloadResult: $response.body#/data/pushPayload
  outputs:
    sessionSecureId: $steps.initializeSession.outputs.sessionSecureId
    trackResult: $steps.addTrackProperties.outputs.trackResult
    payloadResult: $steps.flushPayload.outputs.payloadResult