Metrics-to-Event Mapping

Honeycomb will combine data points into the same event if:

  • they were received as part of the same OTLP request
  • their timestamps are equivalent when truncated to the second (we truncate metric timestamps to the second for improved compaction)
  • they have the same set of resource attribute keys and values
  • they have the same set of data point attribute keys and values (sometimes these are also called “tags” or “labels”)

Combining Across Metric Streams 

Given a single metrics request that contains the following data:

Resource:
  - service.name: greyhound
  - host.name: greyhound-9ab3f2
  - cloud.availability_zone: us-east-1c
Metric: system.cpu.utilization.user
  - Timestamp: 1623110537 # 1970-01-01 00:00:01.623110537 +0000 UTC
    Value: 34
Metric: system.cpu.utilization.system
  - Timestamp: 1823110538 # 1970-01-01 00:00:01.823110538 +0000 UTC
    Value: 8
Metric: runtime.go.goroutines
  - Timestamp: 1623110537
    Value: 635
Metric: runtime.go.gc.count
  - Timestamp: 1823110538
    Value: 321

Honeycomb will store a single event that contains the following data:

- Timestamp: 1000000000 # 1970-01-01 00:00:01 +0000 UTC
  service.name: greyhound
  host.name: greyhound-9ab3f2
  cloud.availability_zone: us-east-1c
  system.cpu.utilization.user: 34
  system.cpu.utilization.system: 8
  runtime.go.goroutines: 635
  runtime.go.gc.count: 321
Note
Both of the timestamps on the above metrics (1623110537 and 1823110538) take place within the first second of the unix epoch. When processed by Honeycomb, the timestamps will be truncated to the second, meaning they will both become 1000000000 (1970-01-01 00:00:01 +0000 UTC). Since the metrics share the same labels and truncated timestamp, we are able to combine them into a single Honeycomb event.

Splitting by Metric Attributes 

Given a single metrics request that contains the following data:

Resource:
  - service.name: greyhound
  - host.name: greyhound-9ab3f2
  - cloud.availability_zone: us-east-1c
Metric: system.cpu.utilization
  - Timestamp: 1623110537 # 1970-01-01 00:00:01.623110537 +0000 UTC
    Attributes:
      - cpu: cpu1
      - state: user
    Value: 34
  - Timestamp: 1623110537
    Attributes:
      - cpu: cpu1
      - state: system
    Value: 8
Metric: runtime.go.goroutines
  - Timestamp: 1623110537
    Value: 635
Metric: runtime.go.gc.count
  - Timestamp: 1623110537
    Value: 321

Honeycomb will store three events that contain the following data:

- Timestamp: 1000000000 # 1970-01-01 00:00:01 +0000 UTC
  system.cpu.utilization: 34
  service.name: greyhound
  host.name: greyhound-9ab3f2
  cloud.availability_zone: us-east-1c
  cpu: cpu1
  state: user

- Timestamp: 1000000000
  system.cpu.utilization: 8
  service.name: greyhound
  host.name: greyhound-9ab3f2
  cloud.availability_zone: us-east-1c
  cpu: cpu1
  state: system

- Timestamp: 1000000000
  service.name: greyhound
  host.name: greyhound-9ab3f2
  cloud.availability_zone: us-east-1c
  runtime.go.goroutines: 635
  runtime.go.gc.count: 321