In order to track deployments, you need to create an instrumentation attribute that Lightstep can use to understand when versions of your app changes. Any time the value of that attribute changes, Lightstep adds a deployment marker to the charts on the deployment page. Here’s an example showing a deployment marker.
You create your version attribute from the Project Settings page (these markers are project-specific).
In your service, add a attribute named
service.version. This will be used to collect version information for the service. Adding attributes to instrumentation is language-specific, so check out the Quick Start topics for how to do that in your service’s language.
- Click Settings to open your project’s settings page.
- On the Project Settings page, scroll down to Deployment Settings.
- Click the + icon. A dropdown shows all attributes found in your instrumentation. Select the attribute from the list.
The attribute now displays as the Version Attribute. You can use multiple attributes to collect deployment information. As long as they are all registered, Lightstep creates markers when a change in value is detected.
What Did We Learn?
- You can create a attribute to hold the value of a service’s version.
- When the attribute’s value changes, Lightstep creates a deployment marker on the charts in the Service Health view.