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

Add startTimeMillis field to JSON Spans submitted to ElasticSearch, #491

Merged
merged 4 commits into from
Nov 4, 2017
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixed linting error
Signed-off-by: Robin Ketelbuters <robinketelbuters@gmail.com>
  • Loading branch information
Robin Ketelbuters committed Oct 24, 2017
commit 7cb1c64b8ca9a8db94d0f554b264b43929a4cd71
2 changes: 1 addition & 1 deletion plugin/storage/es/spanstore/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (s *SpanWriter) writeService(indexName string, jsonSpan *jModel.Span) error

func (s *SpanWriter) writeSpan(indexName string, jsonSpan *jModel.Span) error {
start := time.Now()
elasticSpan := Span{Span: jsonSpan, StartTimeMillis: jsonSpan.StartTime / 1000} // Microseconds to milliseconds
elasticSpan := Span{Span: jsonSpan, StartTimeMillis: jsonSpan.StartTime / 1000} // Microseconds to milliseconds
_, err := s.client.Index().Index(indexName).Type(spanType).BodyJson(&elasticSpan).Do(s.ctx)
s.writerMetrics.spans.Emit(err, time.Since(start))
if err != nil {
Expand Down