Skip to content
lightstep

GitHub Action

Lightstep Services Change Report

v0.2.1 Latest version

Lightstep Services Change Report

lightstep

Lightstep Services Change Report

Capture and analyze detailed behavior of your services using Lightstep

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Lightstep Services Change Report

uses: lightstep/lightstep-action-snapshot@v0.2.1

Learn more about this action in lightstep/lightstep-action-snapshot

Choose a version

Lightstep Services Change Report

The lightstep/lightstep-action-snapshot action takes a snapshot of a service in Lightstep and optionally attaches analysis of existing snapshot(s) to related pull requests or issues that helps developers understand how their production services change over time.

Snapshots help you correlate code changes in GitHub with latency and errors in different environments.

Example Output in a PR

Requirements

Lightstep

Usage

This action can be run on ubuntu-latest GitHub Actions runner.

Taking a snapshot requires one step and no other dependencies:

    steps:  
      - name: Take Lightstep Snapshot
        id: lightstep-snapshot
        with:
          lightstep_api_key: ${{ secrets.LIGHTSTEP_API_KEY }}
          lightstep_organization: org
          lightstep_project: project
          # See https://api-docs.lightstep.com/reference#query-syntax
          # for supported queries.
          lightstep_snapshot_query: service IN ("frontend")

Most workflows will involve taking a snapshot and performing analysis on that snapshot, usually in the context of a GitHub PR or Issue. See examples below.

Example Workfkows

Inputs

The following are required and can also be passed as environment variables:

Action Input Env var
lightstep_organization LIGHTSTEP_ORGANIZATION
lightstep_project LIGHTSTEP_PROJECT
lightstep_service LIGHTSTEP_SERVICE
lightstep_api_key LIGHTSTEP_API_KEY

To take a snapshot, the following input is required:

Action Input Description
lightstep_snapshot_query Query for what telemetry to collect in a snapshot

To analyze a snapshot, the following input is required:

Action Input Description
lightstep_snapshot_id Existing snapshot id to analyze and add as a comment on an issue/PR

The following are optional:

Action Input Description
lightstep_snapshot_compare_id Snapshot to compare with lightstep_snapshot_id - if set to * will find the most recent snapshot
disable_comment Prevents a comment from being added to an issue/PR

Outputs

Action Input Summary
lightstep_snapshot_id ID of the taken snapshot
lightstep_snapshot_md Markdown analysis of the snapshot

Using locally

This action can also be used with the act tool to run this action locally.

For example, this act with the example snapshot workflow in this repository to take a snapshot from a local environment:

  $ export LIGHTSTEP_API_KEY=your-api-key
  $ act deployment -s LIGHTSTEP_API_KEY=$LIGHTSTEP_API_KEY -W examples/workflows/snapshot.yml

License

Apache License 2.0