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

feature/exporter: add Drop Counts for oltptracer's event and link #2601

Merged
merged 6 commits into from Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Support `OTEL_EXPORTER_ZIPKIN_ENDPOINT` env to specify zipkin collector endpoint (#2490)
- Log the configuration of TracerProviders, and Tracers for debugging. To enable use a logger with Verbosity (V level) >=1
- Added environment variables for: `OTEL_BSP_SCHEDULE_DELAY`, `OTEL_BSP_EXPORT_TIMEOUT`, `OTEL_BSP_MAX_QUEUE_SIZE` and `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` (#2515)
- Add Drop Counts for oltptracer's event and link (#2601)
1046102779 marked this conversation as resolved.
Show resolved Hide resolved

### Changed

Expand Down
15 changes: 8 additions & 7 deletions exporters/otlp/otlptrace/internal/tracetransform/span.go
Expand Up @@ -162,9 +162,10 @@ func links(links []tracesdk.Link) []*tracepb.Span_Link {
sid := otLink.SpanContext.SpanID()

sl = append(sl, &tracepb.Span_Link{
TraceId: tid[:],
SpanId: sid[:],
Attributes: KeyValues(otLink.Attributes),
TraceId: tid[:],
SpanId: sid[:],
Attributes: KeyValues(otLink.Attributes),
DroppedAttributesCount: uint32(otLink.DroppedAttributeCount),
})
}
return sl
Expand All @@ -191,10 +192,10 @@ func spanEvents(es []tracesdk.Event) []*tracepb.Span_Event {
nEvents++
events = append(events,
&tracepb.Span_Event{
Name: e.Name,
TimeUnixNano: uint64(e.Time.UnixNano()),
Attributes: KeyValues(e.Attributes),
// TODO (rghetia) : Add Drop Counts when supported.
Name: e.Name,
TimeUnixNano: uint64(e.Time.UnixNano()),
Attributes: KeyValues(e.Attributes),
DroppedAttributesCount: uint32(e.DroppedAttributeCount),
1046102779 marked this conversation as resolved.
Show resolved Hide resolved
},
)
}
Expand Down