question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ArmeriaReactiveWebServerFactory's lamda in access log

See original GitHub issue
2020-10-10 13:24:02.517  INFO 71589 --- [-worker-nio-2-1] com.linecorp.armeria.logging.access      : 0:0:0:0:0:0:0:1 - - 10/Oct/2020:13:23:07 +0900 "GET /#ArmeriaReactiveWebServerFactory$$Lambda$742/0x00000008005adc40 h1c" 200 22 "-" "curl/7.64.1" "-"
2020-10-10 13:24:02.517  INFO 87808 --- [orker-epoll-2-1] com.linecorp.armeria.logging.access      : 0:0:0:0:0:0:0:1 - - 10/Oct/2020:04:42:12 +0000 "GET /actuator/prometheus#ArmeriaReactiveWebServerFactory$$Lambda$659/0x0000000840524440 h1c" 200 1462778 "-" "Prometheus/2.19.0" "-"

When you run a Spring Webflux application with armeria-spring-boot2-webflux-starter, you can see those requests which are caught by this catch-all service are logged like the above, which are not that pretty.

I think that ArmeriaReactiveWebServerFactory’s lamda in access log is annoying and unnecessary information for access log, it seems better to remove it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
delegacycommented, Oct 12, 2020

FYI)

From armeria-examples/spring-boot-tomcat

2020-10-12 19:39:40.828  INFO 10853 --- [-worker-nio-2-2] com.linecorp.armeria.logging.access      : 0:0:0:0:0:0:0:1 - - 12/Oct/2020:19:39:40 +0900 "GET /#UnmanagedTomcatService h1c" 200 5 "-" "curl/7.64.1" "-"

From armeria-examples/spring-boot-minimal

2020-10-12 19:43:15.020  INFO 11137 --- [-worker-nio-2-1] com.linecorp.armeria.logging.access      : 0:0:0:0:0:0:0:1 - - 12/Oct/2020:19:43:14 +0900 "GET /#HelloAnnotatedService$$EnhancerBySpringCGLIB$$fa5f47f6/defaultHello h1c" 200 57 "-" "curl/7.64.1" "-"
2020-10-12 19:48:26.399  INFO 11137 --- [-worker-nio-2-3] com.linecorp.armeria.logging.access      : 0:0:0:0:0:0:0:1 - - 12/Oct/2020:19:48:26 +0900 "GET /not-found#FallbackService h1c" 404 13 "-" "curl/7.64.1" "-"

It seems logging service names in access log even for non-RPC requests is a default behavior in any case. Then, it could be better not to have lamda names/enhanced class names as service names.

Plus, we could think an option to omit service names in access log as well.

0reactions
ikhooncommented, Dec 9, 2020

Plus, we could think an option to omit service names in access log as well.

If users want to format the access log dynamically, do we add an AccessLogWriterBuilder and build a format programmatically? For example:

AccesssLogWriter.builder()
                .add(AccessLogType.LOCAL_IP_ADDRESS)
                // Add a pattern if a condition is matched
                .add(AccessLogType.AUTHENTICATED_USER, log -> log.context().path().equals("admin"))
                // Modify a pattern and add it if a condition is matched
                .add(AccessLogType.REQUEST_LINE, log -> true, requestLine -> requestLine.replace(...))
                .build();
Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing an access log — Armeria documentation
To write an access log, you need to configure a logging framework first. The following configurations are simple examples of logback.xml and log4j2.xml ......
Read more >
Access to CloudWatch Logs - AWS Lambda
Lambda roles must have access to CloudWatch Logs. If you are building a policy manually, ensure that it includes:
Read more >
The Missing Guide to AWS API Gateway Access Logs
You could process a request correctly in your Lambda function but return the wrong shape back to API Gateway. When I'm building web...
Read more >
Send AWS Services Logs With The Datadog Lambda Function
AWS service logs can be collected with the Datadog Forwarder Lambda function. This Lambda—which triggers on S3 ... API Gateway Access Logs, CloudWatch....
Read more >
Solved: Dynatrace SaaS - Lambda logs
Solved: Hi Is there any way to get access to Lambda logs via Dynatrace SaaS? At the moment, the basic metrics available, but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found