Annotate the Timeline with Markers | Honeycomb

Annotate the Timeline with Markers

Here at Honeycomb, we like to say that the greatest single cause of chaos in systems is humanity. And in the case of observing systems, this generally manifests in two ways: aberrant customer behavior or changes in the code.

One of the easiest ways to highlight chaos caused by the latter is by using markers: points in time that indicate that an interesting thing has happened. Markers can be applied to both datasets and environments. Once you have created a marker at a specific time, any queries run on that dataset including that time period will display a dotted vertical line (and optional message when you mouse over it):

Animation illustrating a query including markers

To create markers, use curl (examples below), install a lightweight tool named honeymarker that provides a CRUD command line interface for managing your markers, or do so directly from the UI on query result graphs.

Add Markers From the UI 

You can add a new marker to your query in just a few clicks. Move your cursor over the graph to your desired time point, then click the honey-plus icon at the top of the time bar to open the Add a Marker dialog box.

Screenshot illustrating the 'Add a Marker' dialog box

Enter a description for your marker in the name field (“Deploy #299” or “Abnormal Spike in Products Page Traffic”). The URL field is optional but is a great way to provide more context on the need for the marker.

Click ‘Create’ to add your marker to the graph. A vertical dotted line displays at the selected time point. Hover over the top of the marker to see the description. If you entered a URL, click on the description to open the URL in a new window.

Screenshot illustrating a newly created marker

Environment versus Dataset Markers 

You can create markers that apply to an entire environment or a specific dataset. Create an environment marker when the range of time is relevant across multiple datasets and Services, such as a deployment marker. Create a dataset marker when the range of time is relevant to the specific dataset or Service.

Note
Honeycomb Classic does not support Environment markers. Learn more about Honeycomb versus Honeycomb Classic.

Honeymarker Installation 

Download and install the latest version of honeymarker by visiting the releases page for v0.2.5 of honeymarker, which contains binary packages for a variety of platforms. The packages install honeymarker to /usr/bin. The binary is called honeymarker, available if you need it in an unpackaged form or for ad-hoc use.

You can view honeymarker’s source here.

Usage 

$ honeymarker -k <your-writekey> -d <dataset> COMMAND [command-specific flags]

Note
For Environment markers, use __all__ for dataset name.

Available Commands 

Command Description
add add a new marker
list list all markers
rm delete a marker
update update a marker

Adding Markers (add

Name Flag Description Required
Start Time -s <arg> / --start_time=<arg> start time for the marker in unix time (seconds since the epoch) No
End Time -e <arg> / --end_time=<arg> end time for the marker in unix time (seconds since the epoch) No
Message -m <arg> / --msg=<arg> message describing this specific marker No
URL -u <arg> / --url=<arg> URL associated with this marker No
Type -t <arg> / --type=<arg> identifies marker type No

All parameters to add are optional.

If start_time is missing, the marker will be assigned the current time.

It is highly recommended that you fill in either message or type. All markers of the same type will be shown with the same color in the UI. The message will be visible above an individual marker.

If a URL is specified along with a message, the message will be shown as a link in the UI, and clicking it will take you to the URL.

Example:

honeymarker \
    -k YOUR_API_KEY \
    -d myservice \
    -t deploy \
    -m "build 192837" \
    add
curl https://api.honeycomb.io/1/markers/myservice -X POST  \
    -H "X-Honeycomb-Team: YOUR_API_KEY"  \
    -d '{"message":"build 192837", "type":"deploy"}'

Listing Markers (list

Name Flag Description Required
JSON --json Output the list as json instead of in tabular form No
Unix Timestamps --unix_time In table mode, format times as unit timestamps (seconds since the epoch) No

Example:

honeymarker \
    -k YOUR_API_KEY \
    -d myservice \
    list
    $ curl https://api.honeycomb.io/1/markers/myservice -X GET  \
    -H "X-Honeycomb-Team: YOUR_API_KEY"

Updating Markers (update

Name Flag Description Required
Marker ID -i <arg> / --id=<arg> ID of the marker to update Yes
Start Time -s <arg> / --start_time=<arg> start time for the marker in unix time (seconds since the epoch) No
End Time -e <arg> / --end_time=<arg> end time for the marker in unix time (seconds since the epoch) No
Message -m <arg> / --msg=<arg> message describing this specific marker No
URL -u <arg> / --url=<arg> URL associated with this marker No
Type -t <arg> / --type=<arg> identifies marker type No

The marker ID is available from the list command, and is also output to the console by the add command.

Example:

    $ honeymarker \
    -k YOUR_API_KEY \
    -d myservice \
    -i n71R3zM1Tn3 \
    -u "http://my.service.co/builds/192837" \
    update
    $ curl https://api.honeycomb.io/1/markers/myservice/n71R3zM1Tn3 -X PUT  \
    -H "X-Honeycomb-Team: YOUR_API_KEY"  \
    -d '{"url":"http://my.service.co/builds/192837"}'

Deleting Markers (rm

Name Flag Description Required
Marker ID -i <arg> / --id=<arg> ID of the marker to delete Yes

The marker ID is available from the list command, and is also output to the console by the add command.

Example:

    $ honeymarker \
    -k YOUR_API_KEY \
    -d myservice \
    -i n71R3zM1Tn3 \
    rm
    $ curl https://api.honeycomb.io/1/markers/myservice/n71R3zM1Tn3 -X DELETE  \
    -H "X-Honeycomb-Team: YOUR_API_KEY"

Filter Markers in the UI 

Honeycomb currently shows environment markers in environment queries and dataset markers in dataset queries by default. You can use the Filter Markers option in Graph Settings within the Query Builder to show environment markers in dataset queries or dataset markers in environment queries.

Screenshot illustrating the 'Filter Markers' dialog box