This page illustrates common uses for Workflow Links. Each scenario includes a template, followed by an example with real values.

You can choose many of these recipes as templates when you create your links in the LightStep UI. These recipes are noted below.

For recipes not included as templates in LightStep, you can copy these examples directly into LightStep to create your own links.

Tips:

  • Replace values in ALL CAPS with your own text.
  • Values in {{brackets}} are variables. In these examples, lowercase values are LightStep variables and should be left as is. Values in {{ALL_CAPS}} represent user-defined variables – you should either verify that your span contains these tags, or replace them with an appropriate tag from your service.

LightStep will automatically URL encode all link definitions and tag values. This means if you provide values that have already been encoded, they may end up double-encoded and not render properly.

Email

This link will open an email to the owner of a specific set of services.

Template

Name Contact: {{$service}} owner
URL mailto:SOME_TEAM@MYCOMPANY.COM
Rules {
  "$service": ["MY_SERVICE_NAME","MY_OTHER_SERVICE_NAME"]
}

Example
This link will open an email addressed to the Client Team, and will be shown on spans from the ios-client and the react-client services only.

Name Contact: {{$service}} owner
URL mailto:team_client@acme.com
Rules {
  "$service": ["ios_client","react_client"]
}

Slack

INCLUDED AS A TEMPLATE IN LIGHTSTEP

This link will open a Slack channel for spans with a specific tag value.

Template

Name Contact: #MY_CHANNEL_NAME
URL https://slack.com/app_redirect?channel=MY_SLACK_CHANNEL
Rules {
  "MY_TAG": ["VALUE_A","VALUE_B"]
}

Example
This link displays for spans when the customer_region_code is east-coast, ny, or bos and opens the #customer_support_east_coast Slack channel.

Name Contact: #customer-support-east-coast
URL https://slack.com/app_redirect?channel=customer_support-east-coast
Rules {
  "customer-region-code": ["east-coast","ny", "bos"]
}

Wiki Playbook

This link points to an alert playbook page and appears when the span has an HTTP error code indicating an authorization error.

Example

Name Playbook: Auth Error
URL http://wiki.com/playbook/auth_error#{{http.status_code}}
Rules {
  "http.status_code": ["401", "403"]
}

Generic Dashboard

This definition creates a link for spans of all services that have release and environment tags, and navigates to an internal dashboard for that release and environment, around the time when the span started.

Template

Name {{$service}} Dashboard at {{$startTimeISO}}
URL https://INTERNAL.DASHBOARD.COM?service={{$service}}&release_tag={{RELEASE_TAG}}&environment={{ENVIRONMENT_TAG}}&beginTimestamp={{$startTimeSeconds-1hr}}&endTimestamp={{$startTimeSeconds+1hr}}
Rules {
  "$service": null,
  "RELEASE_TAG": null,
  "ENVIRONMENT_TAG": null
}

Example

This link displays for spans of all services in any release to the staging or production environment and navigates to a dashboard that shows data within +/- 1 hour of the span start time.

Name {{$service}} Dashboard at {{$startTimeISO}}
URL https://INTERNAL.DASHBOARD.COM?service={{$service}}&release_tag={{release}}&environment={{evironment}}&beginTimestamp={{$startTimeSeconds-1hr}}&endTimestamp={{$startTimeSeconds+1hr}}
Rules {
  "$service": null,
  "release": null,
  "environment": ["staging", "production"]
}

GCP Stackdriver Logs

INCLUDED AS A TEMPLATE IN LIGHTSTEP (as shown in the example)

This definition creates a link for spans that have a defined tag and searches Stackdriver logs for that tag in a specific project.

Template

Name Logs for {{MY_INTERESTING_TAG}} at {{$startTimeISO}}
URL https://console.cloud.google.com/logs/viewer?project=MY_PROJECT_NAME&advancedFilter=MY_SEARCH_TERMS&timestamp={{$startTimeISO}}&interval=JUMP_TO_TIME&scrollTimestamp={{$startTimeISO}}
Rules {
  "MY_INTERESTING_TAG": null
}

Example

This link searches logs for this customer_id in the logs for the current service (in the production environment). The link will only be displayed for spans that have a tag called customer_id.

Name Logs for {{customer_id}} at {{$startTimeISO}}
URL https://console.cloud.google.com/logs/viewer?project=production&advancedFilter=labels.customer_id="{{customer_id}}" logName="project/logs/{{$service}}"&timestamp={{$startTimeISO}}&interval=JUMP_TO_TIME&scrollTimestamp={{$startTimeISO}}
Rules {
  "customer_id": null
}

Do not URL encode the advancedFilter text below. LightStep encodes links when displayed on the trace page.

GCP Kubernetes Node

INCLUDED AS A TEMPLATE IN LIGHTSTEP

This link will take you directly to the Kubernetes Dashboard page for the Node (VM) that hosts the pod that generated this span.

To use this template, you’ll need several pieces of information: the GCP Project ID and Zone, and GKE Cluster and Node ID. These can be hard-coded in the URL or added as tags when initializing the LightStep tracer, then included as variables in the URL.

Template

Name Kubernetes Node (VM)
URL https://console.cloud.google.com/kubernetes/node/{{GCP_ZONE}}/{{GKE_CLUSTER}}/{{GKE_NODE}}?project={{GCP_PROJECT_ID}}
Rules {
  "$service": null,
  "GCP_PROJECT_ID": null,
  "GCP_ZONE": [“ZONE_A”, “ZONE_B”],
  "GKE_CLUSTER": null,
  "GKE_NODE": null
}

Example

This link displays for spans of all instances in the us-central1-f or us-east1 GCP zones, and navigates to the Kubernetes Node where the instrumented service instance is running.

Name Kubernetes Node (Machine)
URL https://console.cloud.google.com/kubernetes/node/{{zone}}/{{cluster}}/{{node}}?project={{project_id}}
Rules {
  "$service": null,
  "project": null,
  "zone": [“us-central1-f”, “us-east1”],
  "cluster": null,
  "node": null
}

AWS Logs

This definition creates a link for spans of all services that have a region tag and navigates to the AWS logs for that service.

Template

Name CloudWatch Logs
URL https://console.aws.amazon.com/cloudwatch/home?region={{REGION_TAG}}#logEventViewer:group=/aws/lambda/{{$service}}
Rules {
  "$service": null,
  "REGION_TAG": null
}

Example

This link displays for spans of all services that have a tag called region, navigates to AWS logs for that service and region.

Name CloudWatch Logs
URL https://console.aws.amazon.com/cloudwatch/home?region={{region}}#logEventViewer:group=/aws/lambda/{{$service}}
Rules {
  "$service": null,
  "region": null
}

EC2 Dashboard

INCLUDED AS A TEMPLATE IN LIGHTSTEP

This definition creates a link for spans of all services that have a region tag and navigates to the Amazon EC2 dashboard for the span’s region.

Template

Name EC2 Dashboard
URL https://console.aws.amazon.com/cloudwatch/home?region={{REGION_TAG}}#cw:dashboard=EC2
Rules {
  "REGION_TAG": null
}

Example

This link displays for all spans with a region tag (in any region) and navigates to the EC2 dashboard for that region.

Name EC2 Dashboard
URL https://console.aws.amazon.com/cloudwatch/home?region={{region}}#cw:dashboard=EC2
Rules {
  "region": null
}

GitHub Search for an Operation

INCLUDED AS A TEMPLATE IN LIGHTSTEP

This definition creates a link for spans of all services and searches a defined GitHub repo for all instances of the span’s operation.

Template

Name GitHub Search: {{$operation}}
URL https://github.com/MY_REPO/search?q={{$operation}}
Rules {
  "$operation": null
}

Example

This link displays for all spans and searches the LightStep GitHub repo for the span’s operation.

Name GitHub Search: {{$operation}}
URL https://github.com/lightstep/lightstep-tracer-go/search?q={{$operation}}
Rules {
  "$operation": null
}

LightStep Dashboard

Because you can create links for anything with a valid URL, you can even create a link into another page in LightStep. This definition creates a link to a defined service’s dashboard at the span’s start time.

Template

Name {{$service}} LS Dashboard
URL https://app.lightstep.com/PROJECT_NAME/dashboard/DASHBOARD_NAME/DASHBOARDID?range=8880&anchor={{$startTimeMicros}}
Rules {
  "$service": ["CORRESPONDING_SERVICE”]
}

Example

This link displays for spans with the ios-client service and navigates to the LightStep dashboard for the ios-client starting at the time the span started.

Name {{$service}} LS Dashboard
URL https://app.lightstep.com/lightstep-demo/dashboard/ios-client/rSWgMWKy?range=8880&anchor={{$startTimeMicros}}
Rules {
  "$service": ["ios-client”]
}