Git Product home page Git Product logo

logbeam's People

Contributors

hamstah avatar nickrw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

logbeam's Issues

ImportError: cannot import name 'CloudWatchLogsHandler'

I have installed the latest logbeam 1.0.1.

pip3.6 install logbeam --user

I tried to run the sample code mentioned on the pypi repo, However, I am getting import error.

I am running the sample code as python3.6 testlogbeam.py

Too small batch_count may lead to excessive memory usage

The default configuration of logbeam that is passed to cwlogs is the following:

buffer_duration = 10000
batch_count = 10
batch_size = 1024 * 1024

Default AWS's configuration is:
buffer_duration = 5000
batch_count = 1000
batch_size = 32768

logbeam sets maximum batch_size but sets batch_count too low which may lead (and does in our case) to slow log queue processing and excessive memory usage. It may be beneficial to set default batch_count to at least 1000.

Resource Not Found Exception got

I have following code :

import logging from logbeam import CloudWatchLogsHandler cw_handler = CloudWatchLogsHandler( log_group_name='my_log_group', log_stream_name='my_log_stream', buffer_duration=10000, batch_count=10, batch_size=1048576 )

Caught exception: An error occurred (ResourceNotFoundException) when calling the PutLogEvents operation: The specified log group does not exist.

When unable to connect to AWS Cloudwatch, AttributeError: 'CloudWatchLogsHandler' object has no attribute 'sink' when shutting down logbeam handler

If you create a logbeam logging handler on a machine that has no Internet access, an error like the following occurs while the application closes:

Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/terris/science37/edc-export-service/edcexport/main.py", line 16, in
EDCExportService().start()
File "/Users/terris/science37/edc-export-service/edcexport/edcexport.py", line 75, in start
loop.run_forever()
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 421, in run_forever
self._run_once()
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 1395, in _run_once
event_list = self._selector.select(timeout)
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/selectors.py", line 577, in select
kev_list = self._kqueue.control(None, max_ev, timeout)
KeyboardInterrupt
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/init.py", line 1944, in shutdown
h.close()
File "/Users/terris/venv/edc/lib/python3.6/site-packages/logbeam/init.py", line 160, in close
self.sink.shutdown()
AttributeError: 'CloudWatchLogsHandler' object has no attribute 'sink'

Upgrade to latest awscli

logbeam currently uses awscli-1.9.8. I removed awscli and installed the latest version (1.14.30). logbeam worked fine but perhaps there are issues that I am not aware of.

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.