fix: default to custom for empty transaction and span types#1272
Merged
kruskall merged 3 commits intoelastic:mainfrom Jul 27, 2022
Merged
fix: default to custom for empty transaction and span types#1272kruskall merged 3 commits intoelastic:mainfrom
kruskall merged 3 commits intoelastic:mainfrom
Conversation
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.
axw
reviewed
Jul 26, 2022
Member
axw
left a comment
There was a problem hiding this comment.
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.
🌐 Coverage report
|
|
this should also fix this one elastic/kibana#126805 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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