Product Updates  

Introducing Derived Columns

By Eben Freeman  |   Last modified on January 11, 2019

We’re excited to introduce derived columns! Derived columns let you run queries based on the value of an expression that’s computed from the columns in an event, making it easier to answer questions such as:

  • What does service performance look like from the perspective of our ten highest-value customers?
  • How many requests spent more than 50% of their request time talking to a database?
  • What fraction of service requests complete in less than 100 milliseconds?
  • How did performance compare between builds older than build ID 4300, and all newer builds?

Let’s look at an example. Say you have events from a user-facing web service, and you wonder “how many requests completed in less than 100 milliseconds, and how many requests took longer than that?”

Previously, you could have added the filter request_time_ms < 100 and eyeballed the count of fast requests. Derived columns now let you directly express this breakdown using a simple function syntax. In this case, you can use the expression

LTE($request_time_ms, 100)

which evaluates to true if the value of the request_time_ms column is less than 100, and false otherwise. You can create a derived column from the ‘Break Down’ clause in the query builder:

creating a derived column

It’s also easy to further refine this query: for example, to compare the count of fast vs slow requests only for a specific customer, or for a specific build number, etc.

More Structure For Your Data

Conceptually, derived columns let you associate extra metadata to events, without needing to change the structure of the raw event. For example, let’s say you want to know “which requests spent most of their request time talking to the database?” But your events only contain absolute timings, e.g.:

    "request_time_ms": 36.4,
    "db_query_time_ms": 7.1

Well, you could compute a db_query_time_fraction field, and add it to your events before sending them off to Honeycomb. But that’s not always practical. Instead, you can use the derived column DIV($db_query_time_ms, $request_time_ms) to get answers in a matter of seconds:

reusing a derived column

In later posts, we’ll explore more applications for derived columns. In the meantime, take a look at the complete documentation and give it a try!


Related Posts

Product Updates   Instrumentation  

Safer Client-Side Instrumentation with Honeycomb's Ingest-Only API Keys

We're delighted to introduce our new Ingest API Keys, a significant step toward enabling all Honeycomb customers to manage their observability complexity simply, efficiently, and...

Product Updates   News & Announcements  

Now Available: Honeycomb Launches Data Residency in Europe

At Honeycomb, we are very concerned about privacy and data sovereignty—it’s something we take very seriously, and in an effort to serve our customers better,...

Product Updates   Connectors & Integrations  

Introducing Honeycomb’s Microsoft Teams Integration for Enhanced Alert Management

Today marks an exciting milestone at Honeycomb, and we're thrilled to share it with you. We officially launched our integration with Microsoft Teams, a step...