Skip to content
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
24 changes: 12 additions & 12 deletions stats/opentelemetry/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ func (s) TestMetricsAndTracesOptionEnabled(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand All @@ -893,7 +893,7 @@ func (s) TestMetricsAndTracesOptionEnabled(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand Down Expand Up @@ -934,7 +934,7 @@ func (s) TestMetricsAndTracesOptionEnabled(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand All @@ -951,7 +951,7 @@ func (s) TestMetricsAndTracesOptionEnabled(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand Down Expand Up @@ -1100,7 +1100,7 @@ func (s) TestSpan(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand All @@ -1117,7 +1117,7 @@ func (s) TestSpan(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand Down Expand Up @@ -1158,7 +1158,7 @@ func (s) TestSpan(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand All @@ -1175,7 +1175,7 @@ func (s) TestSpan(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand Down Expand Up @@ -1326,7 +1326,7 @@ func (s) TestSpan_WithW3CContextPropagator(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand All @@ -1343,7 +1343,7 @@ func (s) TestSpan_WithW3CContextPropagator(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand Down Expand Up @@ -1384,7 +1384,7 @@ func (s) TestSpan_WithW3CContextPropagator(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand All @@ -1401,7 +1401,7 @@ func (s) TestSpan_WithW3CContextPropagator(t *testing.T) {
Attributes: []attribute.KeyValue{
{
Key: "sequence-number",
Value: attribute.IntValue(1),
Value: attribute.IntValue(0),
},
{
Key: "message-size",
Expand Down
4 changes: 2 additions & 2 deletions stats/opentelemetry/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ func populateSpan(rs stats.RPCStats, ai *attemptInfo) {
case *stats.InPayload:
// message id - "must be calculated as two different counters starting
// from one for sent messages and one for received messages."
ai.countRecvMsg++
span.AddEvent("Inbound compressed message", trace.WithAttributes(
attribute.Int64("sequence-number", int64(ai.countRecvMsg)),
attribute.Int64("message-size", int64(rs.Length)),
attribute.Int64("message-size-compressed", int64(rs.CompressedLength)),
))
ai.countRecvMsg++
case *stats.OutPayload:
ai.countSentMsg++
span.AddEvent("Outbound compressed message", trace.WithAttributes(
attribute.Int64("sequence-number", int64(ai.countSentMsg)),
attribute.Int64("message-size", int64(rs.Length)),
attribute.Int64("message-size-compressed", int64(rs.CompressedLength)),
))
ai.countSentMsg++
case *stats.End:
if rs.Error != nil {
s := status.Convert(rs.Error)
Expand Down