Git Product home page Git Product logo

Comments (3)

ridakk avatar ridakk commented on May 31, 2024

it might not be a good thing to cast everything to string. for ex: i am adding an object as below to rrr.

rrr.attrs.rid = {
  root: '1234',
  local: '1111',
  remote: '4321'
}

once this is stringified, it will be hard to read and guess it will be impossible to search through kibana from multiple entries with root part only

from swagger-stats.

sv2 avatar sv2 commented on May 31, 2024

Right ... the challenge is that once "rid" is added dynamically as an object to ElasticSearch index mapping, it will have to be always an object in all subsequent indexed documents. That is, if app by some reason adds attr.rid = "abc" in the next request, Elasticsearch will reject this. This opens up possibility to lose information about request / response if application uses custom attributes with the same name but different types. I am trying to find a way to avoid such loss of information - ensure that information is always written to Elasticsearch, even if application adds custom attribute with the same name but with different type of values in different requests. Perhaps to store such object we can simply declare that a placeholder "attrsobj" should be used to add objects, and enforce object type for everything application places under it.

from swagger-stats.

ridakk avatar ridakk commented on May 31, 2024

To me, it is quite fair just to document this as a limitation. otherwise, it will be quite hard to cover every different use case. and having different holders for objects, string, integers sound not ok to me just from perpective of application as i really hate to write if cases :)

from swagger-stats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.