Skip to content

Commit

Permalink
fix telemetry spec for start-state and end-state
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Feb 4, 2021
1 parent 8f77ea4 commit 7eeba0c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.1 - 2021-02-03

### Fixed

- Fixed start-state and end-state keys for handle-type events

## 0.1.0 - 2021-02-03

### Added
Expand Down
3 changes: 2 additions & 1 deletion lib/slipstream/honeycomb/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ defmodule Slipstream.Honeycomb.Connection do
%Event{
time: metadata.start_time,
data: %{
state: inspect(metadata.state),
start_state: inspect(metadata.start_state),
end_state: inspect(metadata.end_state),
traceId: metadata.trace_id,
parentId: metadata.connection_id,
id: metadata.span_id,
Expand Down
6 changes: 4 additions & 2 deletions test/slipstream/honeycomb/connection_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ defmodule Slipstream.Honeycomb.ConnectionTest do
assert event.data.id == metadata.connection_id

metadata = %{
state: %{},
start_state: %{},
end_state: %{},
connection_id: "foo",
span_id: "baz",
trace_id: "bar",
Expand All @@ -63,7 +64,8 @@ defmodule Slipstream.Honeycomb.ConnectionTest do
assert_receive {:send_event, event}

assert event.time == metadata.start_time
assert event.data.state == "%{}"
assert event.data.start_state == "%{}"
assert event.data.end_state == "%{}"
assert event.data.traceId == metadata.trace_id
assert event.data.parentId == metadata.connection_id
assert event.data.id == metadata.span_id
Expand Down

0 comments on commit 7eeba0c

Please sign in to comment.