Skip to content

Conversation

narsaynorath
Copy link
Member

@narsaynorath narsaynorath commented Apr 26, 2024

Some SDKs send this field as an integer, which gets converted to None by the v.as_str() call.

I added code to catch if the value is an integer and convert it to a string. In terms of testing, I tested the function which extracts the status, but also added sample spans to the mobile event to generate a snapshot validating both string or integers are extracted.

The issue was identified as a difference between Android and iOS events.

Some SDKs send this field as an integer, which gets converted to `None`
by the `v.as_str()` call. Catch if the value is an integer and convert
it to a string.
@narsaynorath narsaynorath requested a review from a team as a code owner April 26, 2024 15:06
@narsaynorath narsaynorath changed the title Nar/fix/span http status code extraction fix(spans): Extract http status code from span data when provided as int Apr 26, 2024
@narsaynorath
Copy link
Member Author

I can't say whether there are SDKs that send the response code in span tags as integers, so I haven't applied the change there. Let me know if you'd like me to do so.

@narsaynorath narsaynorath merged commit cdc7a1f into master Apr 29, 2024
@narsaynorath narsaynorath deleted the nar/fix/span_http_status_code_extraction branch April 29, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants