Skip to content
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

up logs isn't finding all log entries #733

Closed
asavoy opened this Issue Nov 10, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@asavoy
Copy link

asavoy commented Nov 10, 2018

Prerequisites

  • I am running the latest version. (0.7.8-pro)
  • I searched to see if the issue already exists.
  • I inspected the verbose debug output with the -v, --verbose flag.
  • Are you an Up Pro subscriber?

Description

up logs isn't finding all log entries when compared to awslogs.

Steps to Reproduce

Please refer to this repo to reproduce the issue: https://github.com/asavoy/up-logs-issue and the test script https://github.com/asavoy/up-logs-issue/blob/master/test.sh

  • The lambda function calls console.log() on each invocation
  • The test script calls the function 100 times, assuming the function has been deployed.
  • Note that ab is used to send 100 concurrent requests, and it doesn't report any failed or non-identical responses
  • up logs finds 31 log entries
  • awslogs finds 98 log entries
  • When I use the CloudWatch Logs Web UI it looks like I see 98 entries too

I can swap over to use awslogs but thought it would be worth raising this issue.

Here's a dump of the terminal output:

$ ./test.sh
++ up url
+ ab -c 100 -n 100 https://j2zv02ct9h.execute-api.us-west-1.amazonaws.com/staging/
This is ApacheBench, Version 2.3 <$Revision: 1826891 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking j2zv02ct9h.execute-api.us-west-1.amazonaws.com (be patient).....done


Server Software:
Server Hostname:        j2zv02ct9h.execute-api.us-west-1.amazonaws.com
Server Port:            443
SSL/TLS Protocol:       TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
TLS Server Name:        j2zv02ct9h.execute-api.us-west-1.amazonaws.com

Document Path:          /staging/
Document Length:        16 bytes

Concurrency Level:      100
Time taken for tests:   18.173 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      68000 bytes
HTML transferred:       1600 bytes
Requests per second:    5.50 [#/sec] (mean)
Time per request:       18172.749 [ms] (mean)
Time per request:       181.727 [ms] (mean, across all concurrent requests)
Transfer rate:          3.65 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       74  867 262.9    960    1009
Processing:   261 8480 2445.4   9103   11516
Waiting:      261 8479 2448.8   9102   11516
Total:       1009 9347 2544.4  10064   12473

Percentage of the requests served within a certain time (ms)
  50%  10064
  66%  10789
  75%  11263
  80%  11454
  90%  11687
  95%  11899
  98%  12109
  99%  12473
 100%  12473 (longest request)
+ echo 'Expect 100 complete requests and 0 failed requests'
Expect 100 complete requests and 0 failed requests
+ echo 'Wait for CloudWatch to catch up'
Wait for CloudWatch to catch up
+ sleep 60
+ up logs -S 1h 'message = "test"'
+ wc -l
      30
+ echo 'Should expect 100 logs found'
Should expect 100 logs found
+ awslogs get /aws/lambda/up-logs-issue --start 1h -f '{ $.message = "test" }'
+ wc -l
      98
+ echo 'Should expect 100 logs found'
Should expect 100 logs found

@asavoy asavoy changed the title logs up logs isn't finding all log entries Nov 10, 2018

@tj

This comment has been minimized.

Copy link
Member

tj commented Nov 10, 2018

hmm interesting, thanks for the detailed report! I'll see if I can replicate

@asavoy

This comment has been minimized.

Copy link
Author

asavoy commented Dec 11, 2018

@tj Thanks! The fix in v0.8.1 resolves the issue. 🎉

@tj

This comment has been minimized.

Copy link
Member

tj commented Dec 12, 2018

awesome :D thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.