You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Documentation] How can I enable python source logging to a mezmo log analysis destination? #109
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 added HTTP since that seemed to be the closest match for using a code library, but that doesn't seem right as the key doesn't serve any purpose.
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:
I don't see any errors, but I see a perpetual log-line from one of the underlying url libraries that indicates it's trying to connect when I run this in my application code. None of the logs seem to show up in the Mezmo dashboard.
This is more critical than that, The python sdk does not authenticate the provided key before sending request. And no error will be raised if trying to send log with a handler configured with a invalid ingestion key. The False-Negative behavior indicates a software quality issue.
Only a message Please provide a valid ingestion key. Discarding flush buffer will to flush to stdout.
Activity
dkhokhlov commentedon Aug 18, 2023
@sabaimran
By default this library is sending logs to standard logging endpoint - Log Analysis destination (not Mezmo Pipeline):
https://github.com/logdna/python/blob/master/logdna/configs.py#L15
Once you have free Mezmo account opened and got the KEY you can use this code example to verify that it is sending logs and you can see them in live view of Web UI:
https://github.com/logdna/python#setup
Let me know if your goal is to use Pipeline.
sabaimran commentedon Aug 18, 2023
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:
I don't see any errors, but I see a perpetual log-line from one of the underlying
urllibraries that indicates it's trying to connect when I run this in my application code. None of the logs seem to show up in the Mezmo dashboard.dkhokhlov commentedon Aug 18, 2023
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:
https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-ingest
davidkhala commentedon Mar 16, 2025
This is more critical than that, The python sdk does not authenticate the provided key before sending request. And no error will be raised if trying to send log with a handler configured with a invalid ingestion key. The False-Negative behavior indicates a software quality issue.
Only a message
Please provide a valid ingestion key. Discarding flush bufferwill to flush to stdout.