Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "add event" event handling #97

Merged
merged 1 commit into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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