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

trace_analysis: 'http.status_code' does not contain a number. Value = String("200") #3

Open
jayvdb opened this issue Jun 4, 2024 · 2 comments · May be fixed by #4
Open

trace_analysis: 'http.status_code' does not contain a number. Value = String("200") #3

jayvdb opened this issue Jun 4, 2024 · 2 comments · May be fixed by #4

Comments

@jayvdb
Copy link

jayvdb commented Jun 4, 2024

We have traces created using tracing-actix-web, which have the following error when trace_analysis is used

> trace_analysis ./traces-uat-jun-1-4.json
Reading all traces from folder: ./traces-uat-jun-1-4.json
Reading a Jaeger-trace from './traces-uat-jun-1-4.json'
About to read trace via serde
thread 'main' panicked at src/raw/jaeger.rs:68:13:
The key 'http.status_code' does not contain a number. Value = String("200")

When I query the tag.type_id, I get both int64 and string, which doesnt surprise me as we have two providers of http trace data - the client and the actix-web middleware.

@cvkem
Copy link
Owner

cvkem commented Jun 6, 2024

Indeed the rust Serde-json (in the way I used it) is strict on types, so a field can not be sometimes a int64 and other times an int64. However, if both are needed I think serde allows an auto-conversion, however, I need to dive into it if that brings value to your use-case. I also noticed you found another way around it. So please let me know if it is useful to investigate this option.

@jayvdb
Copy link
Author

jayvdb commented Jun 6, 2024

I am happy with #4 for the moment. Manually supporting both will get tedious if there are lots of tags being parsed that could be both, but I suspect most will be only valid in one data type.

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 a pull request may close this issue.

2 participants