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

[v2][adjuster] Implement ip attribute adjuster to operate on otlp data model #6355

Merged
merged 8 commits into from
Dec 13, 2024

Conversation

mahadzaryab1
Copy link
Collaborator

Which problem is this PR solving?

Description of the changes

  • This PR implements the IPTag adjuster to operate on the OTLP data model. In the OTLP model, tags are dubbed as attributes so the adjuster was renamed to IPAttribute.

How was this change tested?

  • Added unit tests

Checklist

}
}

return Func(func(traces ptrace.Traces) (ptrace.Traces, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yurishkuro The function in v1 looks like this

	return Func(func(trace *model.Trace) (*model.Trace, error) {
		for _, span := range trace.Spans {
			adjustTags(span.Tags)
			adjustTags(span.Process.Tags)
			model.KeyValues(span.Process.Tags).Sort()
		}
		return trace, nil
	})

Couple of questions:

  • Are process tags also just part of attributes in OTLP?
  • Do these attributes need to be sorted?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • process tags are translated into Resource.attributes
  • I don't think they need to be sorted here.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.09%. Comparing base (e98f7f5) to head (602d9c7).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6355      +/-   ##
==========================================
+ Coverage   96.07%   96.09%   +0.01%     
==========================================
  Files         359      360       +1     
  Lines       20504    20548      +44     
==========================================
+ Hits        19700    19746      +46     
+ Misses        613      611       -2     
  Partials      191      191              
Flag Coverage Δ
badger_v1 8.84% <ø> (ø)
badger_v2 1.60% <ø> (ø)
cassandra-4.x-v1-manual 14.74% <ø> (ø)
cassandra-4.x-v2-auto 1.55% <ø> (ø)
cassandra-4.x-v2-manual 1.55% <ø> (ø)
cassandra-5.x-v1-manual 14.74% <ø> (ø)
cassandra-5.x-v2-auto 1.55% <ø> (ø)
cassandra-5.x-v2-manual 1.55% <ø> (ø)
elasticsearch-6.x-v1 18.37% <ø> (+<0.01%) ⬆️
elasticsearch-7.x-v1 18.45% <ø> (+<0.01%) ⬆️
elasticsearch-8.x-v1 18.60% <ø> (ø)
elasticsearch-8.x-v2 1.60% <ø> (-0.01%) ⬇️
grpc_v1 10.34% <ø> (+<0.01%) ⬆️
grpc_v2 7.81% <ø> (ø)
kafka-v1 9.17% <ø> (ø)
kafka-v2 1.60% <ø> (ø)
memory_v2 1.60% <ø> (ø)
opensearch-1.x-v1 18.50% <ø> (ø)
opensearch-2.x-v1 18.49% <ø> (-0.01%) ⬇️
opensearch-2.x-v2 1.60% <ø> (ø)
tailsampling-processor 0.45% <ø> (ø)
unittests 94.98% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
Signed-off-by: Mahad Zaryab <[email protected]>
@yurishkuro yurishkuro merged commit cd99501 into jaegertracing:main Dec 13, 2024
54 checks passed
@mahadzaryab1 mahadzaryab1 deleted the ip-adjuster branch December 13, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants