Sending Your First Event

Data in Honeycomb

Data in Honeycomb is described as a series of Events, each of which represents some happening worth tracking. Related or recurring events should be collected under a single Dataset.

Each event holds one or more key-value pairs. When Honeycomb receives an event for a dataset that you have not used before, it automatically creates a Dataset in the background. (In Honeycomb, all events must belong to a dataset.)

In this example, you will create a dataset called ‘MyFirstEvent’ by sending Honeycomb a single Event via curl, a simple command that transfers data. In the snippet below, remember to replace YOUR_WRITE_KEY with the Write Key for your team (accessible in the Account page). The following will create a MyFirstEvent dataset, with a set of sample attributes:

curl -X POST \
  -H "X-Honeycomb-Team: $YOUR_WRITE_KEY" \
  -d '{"status":200,"path":"/docs/","latency_ms":13.1,"cached":false}'

All Honeycomb events have a timestamp: If you skip specifying one when sending an event, like we did here, Honeycomb will assign a timestamp based on the time Honeycomb received the event.

The event you sent via curl can be found under the dataset ‘MyFirstEvent.’ If the dataset did not exist before you ran the curl, Honeycomb created an dataset for you.

Your Write Key is expected as a header on all requests you make to Honeycomb servers and is used to authenticate you. Honeycomb generally expects a flat map of strings to JSON primitives, but can handle arrays or nested objects by serializing or unfurling them. See Getting JSON Logs into Honeycomb for more details.

View Your First Event

Once your curl returns successfully, load the Honeycomb dashboard. You will see your new Dataset (named ‘MyFirstEvent’, if you stuck with Honeycomb’s defaults).

If you click the “Recent Samples” button at the top of the page (inside the gray header), you will see a table that contains the structured event you just sent in, along with a Timestamp column.

The “Recent Samples” button will always display the 10 most recently received events for a dataset.

Show Samples List Samples

At the top of the page you will see the Query Builder, a series of grey boxes that provides the primary way to construct queries that enable you to inspect your data.

Click on any of the Builder’s grey boxes. For this example, Honeycomb has set up a default query: a COUNT of events received for the dataset over the last two hours. Click Run (on the right-hand side of the builder), and Honeycomb will display a simple graph that shows Honeycomb recently received one event for this dataset.

Simple Query Results

Congratulations! You’ve run your first query on your very own dataset in Honeycomb. At this point, you’re ready to explore the different shapes a query can take.

or check out some case studies and debugging scenarios