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

[refactor] Clean up span.kind tag handling #6390

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

yurishkuro
Copy link
Member

@yurishkuro yurishkuro commented Dec 20, 2024

Description of the changes

  • Introduce strongly typed constants and keys for some standard tags
  • Remove odd dependency on otel/trace SDK for model processing

@yurishkuro yurishkuro requested a review from a team as a code owner December 20, 2024 01:38
@yurishkuro yurishkuro added the changelog:skip Trivial change that does not require an entry in CHANGELOG label Dec 20, 2024
@yurishkuro yurishkuro changed the title Clean up span.kind tag handling [refactor] Clean up span.kind tag handling Dec 20, 2024
)

func SpanKindFromString(kind string) (SpanKind, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we add unit tests for this function?

SpanKindProducer SpanKind = "producer"
SpanKindConsumer SpanKind = "consumer"
SpanKindInternal SpanKind = "internal"
SpanKindUnspecified SpanKind = ""
Copy link
Collaborator

@mahadzaryab1 mahadzaryab1 Dec 20, 2024

Choose a reason for hiding this comment

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

should this be "unspecified" - looks like some tests have expectations around that

Copy link
Member Author

Choose a reason for hiding this comment

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

Unspecified is an OTEL value, it did not exist in OpenTracing, so I left it blank.

And in OTLP it's technically undefined which strings should be used because the values are numeric enums.

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.22%. Comparing base (6032db9) to head (4a64788).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6390      +/-   ##
==========================================
+ Coverage   96.19%   96.22%   +0.02%     
==========================================
  Files         362      362              
  Lines       20671    20679       +8     
==========================================
+ Hits        19885    19898      +13     
+ Misses        601      597       -4     
+ Partials      185      184       -1     
Flag Coverage Δ
badger_v1 9.04% <0.00%> (-0.01%) ⬇️
badger_v2 1.64% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1-manual 15.04% <38.46%> (+0.02%) ⬆️
cassandra-4.x-v2-auto 1.58% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v2-manual 1.58% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v1-manual 15.04% <38.46%> (+0.02%) ⬆️
cassandra-5.x-v2-auto 1.58% <0.00%> (-0.01%) ⬇️
cassandra-5.x-v2-manual 1.58% <0.00%> (-0.01%) ⬇️
elasticsearch-6.x-v1 18.75% <0.00%> (-0.03%) ⬇️
elasticsearch-7.x-v1 18.83% <0.00%> (-0.02%) ⬇️
elasticsearch-8.x-v1 18.99% <0.00%> (-0.02%) ⬇️
elasticsearch-8.x-v2 1.63% <0.00%> (-0.02%) ⬇️
grpc_v1 10.72% <38.46%> (+0.03%) ⬆️
grpc_v2 7.98% <38.46%> (+0.03%) ⬆️
kafka-v1 9.40% <38.46%> (+0.03%) ⬆️
kafka-v2 1.64% <0.00%> (-0.01%) ⬇️
memory_v2 1.64% <0.00%> (+<0.01%) ⬆️
opensearch-1.x-v1 18.88% <0.00%> (-0.02%) ⬇️
opensearch-2.x-v1 18.88% <0.00%> (-0.03%) ⬇️
opensearch-2.x-v2 1.64% <0.00%> (-0.01%) ⬇️
tailsampling-processor 0.47% <0.00%> (-0.01%) ⬇️
unittests 95.06% <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.

@yurishkuro yurishkuro merged commit 42a20f0 into jaegertracing:main Dec 20, 2024
54 checks passed
@yurishkuro yurishkuro deleted the span-kind branch December 20, 2024 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:skip Trivial change that does not require an entry in CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants