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

fix: default to custom for empty transaction and span types #1272

Merged
merged 3 commits into from
Jul 27, 2022

Conversation

kruskall
Copy link
Member

According to the spec:

If no transaction.type or span.type is provided or the value
is an empty string, the agent needs to set a default value
custom.

Add test to assert the behaviour is compliant to the spec.

Closes #1211

According to the spec:

If no transaction.type or span.type is provided or the value
is an empty string, the agent needs to set a default value
custom.

Add test to assert the behaviour is compliant to the spec.
@elastic-apm-tech elastic-apm-tech added this to In Progress in APM-Agents (OLD) Jul 25, 2022
@apmmachine
Copy link
Collaborator

apmmachine commented Jul 25, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-07-27T07:21:27.909+0000

  • Duration: 48 min 55 sec

Test stats 🧪

Test Results
Failed 0
Passed 7475
Skipped 174
Total 7649

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark test.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

Looks good, but the module/apmot tests are failing, as they are depending on Type to be empty after construction.

Maybe there's a better alternative, but we I think we may need to set this default value when ending the transaction or span, if the value is empty. That's a bit more foolproof anyway, since users could directly set Type = "" after starting the transaction or span.

span_test.go Outdated Show resolved Hide resolved
transaction_test.go Outdated Show resolved Hide resolved
@apmmachine
Copy link
Collaborator

apmmachine commented Jul 26, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (59/59) 💚
Files 99.346% (152/153) 👍
Classes 96.264% (335/348) 👍
Methods 90.274% (956/1059) 👍
Lines 82.111% (11094/13511) 👎 -0.029
Conditionals 100.0% (0/0) 💚

@kruskall kruskall requested a review from axw July 26, 2022 22:25
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

LGTM!

@kruskall kruskall merged commit 5d5e898 into elastic:main Jul 27, 2022
APM-Agents (OLD) automation moved this from In Progress to Done Jul 27, 2022
@kruskall kruskall deleted the fix/empty-transaction-span-type branch July 27, 2022 08:22
@ugosan
Copy link

ugosan commented Aug 10, 2022

this should also fix this one elastic/kibana#126805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Agent can send empty transaction and span types
4 participants