Coder Social home page Coder Social logo

bunyan-elasticsearch's People

Contributors

figadore avatar moooji avatar pmlarocque avatar simianhacker avatar thalesfsp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bunyan-elasticsearch's Issues

Elastic Search mapper_parsing_exception

I'm getting the following error, using the documentation on the readme.

Elasticsearch Stream Error: Error: [mapper_parsing_exception] failed to find type parsed [multi_field] for [name]

I followed the instructions regarding posting the template.json file as well.

I'm targeting the AWS ES service v 5.1

Mapping template `path: full` deprecated

Seems the [path: full] in Object type mapping is now deprecated.

Elasticsearch Stream Error: [mapper_parsing_exception] Mapping definition for [geoip] has unsupported parameters: [path : full] :: {"path":"/logstash-2016.08.26/api","query":{"op_type":"create"},"body":"{\"name\":\"default\",\"hostname\":\"API-Staging\",\"pid\":8969,\"level\":\"info\",\"v\":0,\"@timestamp\":\"2016-08-26T04:24:17.754Z\",\"message\":\"ApiApps loaded successfully from db!\"}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"mapper_parsing_exception\",\"reason\":\"Mapping definition for [geoip] has unsupported parameters: [path : full]\"}],\"type\":\"mapper_parsing_exception\",\"reason\":\"Failed to parse mapping [_default_]: Mapping definition for [geoip] has unsupported parameters: [path : full]\",\"caused_by\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"Mapping definition for [geoip] has unsupported parameters: [path : full]\"}},\"status\":400}"}

logger doesn't work with es version 8

Error that i receive is

Elasticsearch Stream Error: Error: no handler found for uri [/logs-turing-api-test-2023.03.27/logs] and method [POST] at respond (/Users/ahmedjehanzaib/Simplus/Projects/Turing/turing-api/node_modules/elasticsearch/src/lib/transport.js:289:15) at checkRespForFailure (/Users/ahmedjehanzaib/Simplus/Projects/Turing/turing-api/node_modules/elasticsearch/src/lib/transport.js:248:7) at HttpConnector.<anonymous> (/Users/ahmedjehanzaib/Simplus/Projects/Turing/turing-api/node_modules/elasticsearch/src/lib/connectors/http.js:164:7) at IncomingMessage.wrapper (/Users/ahmedjehanzaib/Simplus/Projects/Turing/turing-api/node_modules/lodash/lodash.js:4991:19) at IncomingMessage.emit (events.js:388:22) at endReadableNT (internal/streams/readable.js:1336:12) at processTicksAndRejections (internal/process/task_queues.js:82:21)

Get rid of JSON.parse

If you do this:

var logger = bunyan.createLogger({
  name: "My Application",
  streams: [
    { stream: process.stdout },
    { stream: esStream, type: 'raw' }
  ],
  serializers: bunyan.stdSerializers
});

Then bunyan will send you raw JSON objects instead of sending you strings, so you won't have to call JSON.parse() on the log entry that Bunyan just JSON.stringified().

Memory leak under load

Using this with a web api server (single logger for the application)... when running under load tests (few thousand concurrent users and millions of requests) the RAM usage will grow to several GB. Without this module, it stays under 50mb.

I noticed the underlying elastic node library is deprecated in favor of a new official library, and that may resolve the issue... Also, may want to replace the moment use with specific date-fns module.

I won't be able to re-create or re-test as we've removed this module from our services and relying on output log shipping from the stdout/stderror logs now. Just wanted to report the issue upstream.

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.