-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Documentation] How can I enable python source logging to a mezmo log analysis destination? #109
Comments
@sabaimran |
Awesome, thanks for the guidance @dkhokhlov . The goal is not to use pipeline -- I'd love to simply use it for Log Analysis. When I setup the script exactly as described in the setup snippet, I'm not able to actually see those logs anywhere. This is how I tested it: (.venv) si@redwood logdna-test % python3
Python 3.11.4 (main, Jul 10 2023, 18:52:37) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> from logdna import LogDNAHandler
>>> key = "<REDACTED INGESTION KEY FROM MEZMO SETTINGS>
>>> logger = logging.getLogger('logdna')
>>> logger.setLevel(logging.INFO)
>>> test = LogDNAHandler(key)
>>> logger.addHandler(test)
>>> logger.info("test info message") I don't see any errors, but I see a perpetual log-line from one of the underlying |
Looks like as issue with KEY. Lets try sending sample log line with curl:
Expected:
and you should see the sample line in live view. full description of this method is here: |
I haven't found the documentation here to be very straightforward. I think I'm supposed to create a new pipeline in order to establish a destination (in this case, the mezmo log analysis destination). When I added the ingestion key to the logger (via
LogDNAHandler
) in my python code, it doesn't end up sending out any logs.Not sure what my
source
is supposed to be in this pipeline. I originally addedHTTP
since that seemed to be the closest match for using a code library, but that doesn't seem right as thekey
doesn't serve any purpose.Any guidance here is appreciated.
The text was updated successfully, but these errors were encountered: