Skip to content

Commit

Permalink
Fix "add event" event handling (open-telemetry#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
krnowak authored and tedsuo committed Aug 16, 2019
1 parent 56e1a9d commit 6dab220
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions experimental/streaming/exporter/reader/format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ func AppendEvent(buf *strings.Builder, data reader.Event) {

case reader.ADD_EVENT:
buf.WriteString("event: ")
buf.WriteString(data.Event.Message())
buf.WriteString(data.Message)
buf.WriteString(" (")
for _, kv := range data.Event.Attributes() {
data.Attributes.Foreach(func(kv core.KeyValue) bool {
buf.WriteString(" " + kv.Key.Variable.Name + "=" + kv.Value.Emit())
}
return true
})
buf.WriteString(")")

case reader.MODIFY_ATTR:
Expand Down
2 changes: 0 additions & 2 deletions experimental/streaming/exporter/reader/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"google.golang.org/grpc/codes"

"go.opentelemetry.io/api/core"
"go.opentelemetry.io/api/event"
"go.opentelemetry.io/api/stats"
"go.opentelemetry.io/api/tag"
"go.opentelemetry.io/experimental/streaming/exporter/observer"
Expand All @@ -41,7 +40,6 @@ type Event struct {
SpanContext core.SpanContext
Tags tag.Map
Attributes tag.Map
Event event.Event
Stats []Measurement

Parent core.SpanContext
Expand Down

0 comments on commit 6dab220

Please sign in to comment.