Giter Site home page Giter Site logo

Comments (4)

simonjupp avatar simonjupp commented on August 14, 2024

Sounds good to me. The 'interesting stuff' was some additional logging that @LLTommy added so we could do some deeper analysis of queries from the logs. We have an ELK stack configured to analyse this output.

from lodestar.

danizen avatar danizen commented on August 14, 2024

Sounds good to me. The 'interesting stuff' was some additional logging that @LLTommy added
so we could do some deeper analysis of queries from the logs. We have an ELK stack configured
to analyse this output.

Would you prefer a pull request to the 1.4 branch or to master? Which is really most current at this point?

from lodestar.

danizen avatar danizen commented on August 14, 2024

@simonjupp , I decided I should of course merge to master, but that 1.4-release should also be merged into master. So, I've created a pull request just for that. I'll proceed on the assumption that 1.4 release should be merged first, but if I send a new pull request, it will be against master.

from lodestar.

danizen avatar danizen commented on August 14, 2024

I've looked at three different ways to get to logs already in JSON, e.g. each line is JSON:

The first two are part of the logstash organization on github, but the last is just some guy. So, I think it is best to stick with log4j 1.2.17, however, moving to a JSON encoding and making use of Mapped Diagnostic Context (MDC) would be a better way to capture the extra information - you guys probably have some complicated logstash configuration turning multiple log messages into one event, or you just look at them and know.

With the first of these, I was able to achieve the following log entry from our SPARQL endpoint:

{
    "@timestamp": "2019-03-07T23:32:36.097Z",
    "source_host": "NLM01890936OCCS",
    "file": "SparqlController.java",
    "method": "query",
    "level": "INFO",
    "line_number": "74",
    "thread_name": "http-nio-8080-exec-2",
    "@version": 1,
    "logger_name": "gov.nih.nlm.lode.api",
    "message": "sparql query",
    "class": "gov.nih.nlm.lode.servlet.SparqlController",
    "mdc": {
        "cliaddr": "0:0:0:0:0:0:0:1",
        "format": "JSON",
        "query": "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\r\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\r\nPREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\r\nPREFIX owl: <http://www.w3.org/2002/07/owl#>\r\nPREFIX meshv: <http://id.nlm.nih.gov/mesh/vocab#>\r\nPREFIX mesh: <http://id.nlm.nih.gov/mesh/>\r\nPREFIX mesh2019: <http://id.nlm.nih.gov/mesh/2019/>\r\nPREFIX mesh2018: <http://id.nlm.nih.gov/mesh/2018/>\r\nPREFIX mesh2017: <http://id.nlm.nih.gov/mesh/2017/>\r\n\r\nSELECT distinct ?d ?dLabel \r\nFROM <http://id.nlm.nih.gov/mesh>\r\nWHERE {\r\n  ?d meshv:allowableQualifier ?q .\r\n  ?q rdfs:label 'adverse effects'@en . \r\n  ?d rdfs:label ?dLabel . \r\n} \r\nORDER BY ?dLabel \r\n",
        "session-id": "C4A0A12448D59EB069F628C00F21A2A5",
        "offset": 0,
        "session-time": "2019-03-07T18:32:35.018-05:00",
        "inference": false,
        "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
        "limit": 50,
        "webui": true
    }
}

from lodestar.

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.