question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

http.response.status_code as long instead of keyword or integer

See original GitHub issue

Hello , I did not found any discussion on this topic so , I ask the question In ECS the http.response.status_code is mapped as long , why ?

Using an integer brings the advantage of taking up less space, but we are not supposed to do digital operations (sum/avg…) on an HTTP status because all codes are between 100 and 599.

Using a keyword will allow to run an aggregation without specifying a null_value. The keyword type will also allow to make range query if necessary (it will be in alphanumeric order): ECS source code

 - name: response.status_code
      format: string
      level: extended
      type: long
      description: >
        HTTP response status code.
      example: 404

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
djptekcommented, Mar 4, 2021

Here’s an example of partition using programmatically generated response codes (long) for every possible value using Lens

image

0reactions
djptekcommented, Jun 2, 2022

Hi @blookot

add a second http.response.status_code_keyword field

this would work - you’d need to add e.g. some painless in the index pipeline to populate that field &/or do a reindex to add this to your legacy data if required

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should a HttpResponse's status_code attribute be an integer ...
The Status-Code element is a 3-digit integer result code of the attempt to understand and satisfy the request. Share.
Read more >
HTTP Status Code 500: What Is the 500 "Internal Server Error"?
The 500 status code "internal server error" is just that - it's an error on the server-side. This means that the server encountered...
Read more >
Using Spring ResponseEntity to Manipulate the HTTP Response
Using Spring ResponseEntity to Manipulate the HTTP Response ; ResponseEntity represents the whole HTTP response: status code, headers, and body.
Read more >
HTTP response status codes - MDN Web Docs - Mozilla
This response code means the returned metadata is not exactly the same as is available from the origin server, but is collected from...
Read more >
Describing Responses - Swagger
A response is defined by its HTTP status code and the data returned in the ... To specify the response media types, use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found