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

Refactor log.level attribute to level #858

Merged
merged 1 commit into from
May 19, 2022
Merged

Conversation

jasonjkeller
Copy link
Contributor

@jasonjkeller jasonjkeller commented May 19, 2022

There was a recent change to the Application Logging spec to refactor the log.level attribute to just level. This PR makes that change.

Related to: https://github.com/newrelic/java-agent-integration-tests/pull/35


End-to-end testing

Log event in payload using level

{"trace.id":"1fad5f1a14ae7e95a4353df8bd6460cc","hostname":"192.168.1.17","level":"INFO","entity.guid":"OTk4ODc5fEFQTXxBUFBMSUNBVElPTnwxODE1NjY5Mg","entity.name":"LoggingApp","span.id":"878f8f2a25962c11","message":"This was logged at INFO with a message from a Supplier<T>: getParameterFromSupplier","timestamp":1652994405292}

Log event in UI using level
level

AITs

.../java-agent-integration-tests/bin/python3 .../java-agent-integration-tests/tests/java/functionality/basic_features/logging_test.py
2022-05-19 14:56:07,238 - INFO: run: /Users/jkeller/code/java-agent-integration-tests/tests/java/functionality/basic_features/logging_test.py:test_application_logging_disabled, tmpdir: /tmp/tmpb_fb6qta
2022-05-19 14:56:07,247 - INFO: ............... collector [10]
2022-05-19 14:56:07,247 - INFO: ................. java_agent [master]
2022-05-19 14:56:07,248 - INFO: ................... java [8]
2022-05-19 14:56:07,249 - INFO: ..................... log_collector_app [master]
2022-05-19 14:56:07,250 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 14:58:26,161 - INFO: ................... java [11]
2022-05-19 14:58:26,162 - INFO: ..................... log_collector_app [master]
2022-05-19 14:58:26,164 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:00:40,920 - INFO: ................... java [17]
2022-05-19 15:00:40,921 - INFO: ..................... log_collector_app [master]
2022-05-19 15:00:40,922 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:03:00,077 - INFO: ................... java [18]
2022-05-19 15:03:00,077 - INFO: ..................... log_collector_app [master]
2022-05-19 15:03:00,079 - INFO: ....................... embedded_jetty [9.3]
.2022-05-19 15:05:14,554 - INFO: run: /Users/jkeller/code/java-agent-integration-tests/tests/java/functionality/basic_features/logging_test.py:test_application_logging_forwarding, tmpdir: /tmp/tmpo_gw_91q
2022-05-19 15:05:14,555 - INFO: ............... collector [10]
2022-05-19 15:05:14,555 - INFO: ................. java_agent [master]
2022-05-19 15:05:14,556 - INFO: ................... java [8]
2022-05-19 15:05:14,556 - INFO: ..................... log_collector_app [master]
2022-05-19 15:05:14,557 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:05:31,504 - INFO: ................... java [11]
2022-05-19 15:05:31,505 - INFO: ..................... log_collector_app [master]
2022-05-19 15:05:31,506 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:05:45,338 - INFO: ................... java [17]
2022-05-19 15:05:45,338 - INFO: ..................... log_collector_app [master]
2022-05-19 15:05:45,339 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:05:58,881 - INFO: ................... java [18]
2022-05-19 15:05:58,881 - INFO: ..................... log_collector_app [master]
2022-05-19 15:05:58,883 - INFO: ....................... embedded_jetty [9.3]
.2022-05-19 15:06:11,819 - INFO: run: /Users/jkeller/code/java-agent-integration-tests/tests/java/functionality/basic_features/logging_test.py:test_application_logging_log4j_local_decorating, tmpdir: /tmp/tmpvwmkiibs
2022-05-19 15:06:11,819 - INFO: ............... collector [10]
2022-05-19 15:06:11,820 - INFO: ................. java_agent [master]
2022-05-19 15:06:11,820 - INFO: ................... java [8]
2022-05-19 15:06:11,820 - INFO: ..................... log_collector_app [master]
2022-05-19 15:06:11,821 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:06:28,069 - INFO: ................... java [11]
2022-05-19 15:06:28,069 - INFO: ..................... log_collector_app [master]
2022-05-19 15:06:28,070 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:06:41,856 - INFO: ................... java [17]
2022-05-19 15:06:41,857 - INFO: ..................... log_collector_app [master]
2022-05-19 15:06:41,858 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:06:54,715 - INFO: ................... java [18]
2022-05-19 15:06:54,715 - INFO: ..................... log_collector_app [master]
2022-05-19 15:06:54,717 - INFO: ....................... embedded_jetty [9.3]
.2022-05-19 15:07:07,582 - INFO: run: /Users/jkeller/code/java-agent-integration-tests/tests/java/functionality/basic_features/logging_test.py:test_application_logging_log4j_metrics, tmpdir: /tmp/tmpyr719d5j
2022-05-19 15:07:07,582 - INFO: ............... collector [10]
2022-05-19 15:07:07,582 - INFO: ................. java_agent [master]
2022-05-19 15:07:07,583 - INFO: ................... java [8]
2022-05-19 15:07:07,583 - INFO: ..................... log_collector_app [master]
2022-05-19 15:07:07,584 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:07:21,633 - INFO: ................... java [11]
2022-05-19 15:07:21,634 - INFO: ..................... log_collector_app [master]
2022-05-19 15:07:21,635 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:07:33,589 - INFO: ................... java [17]
2022-05-19 15:07:33,590 - INFO: ..................... log_collector_app [master]
2022-05-19 15:07:33,591 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:07:44,419 - INFO: ................... java [18]
2022-05-19 15:07:44,419 - INFO: ..................... log_collector_app [master]
2022-05-19 15:07:44,420 - INFO: ....................... embedded_jetty [9.3]
.2022-05-19 15:07:55,441 - INFO: run: /Users/jkeller/code/java-agent-integration-tests/tests/java/functionality/basic_features/logging_test.py:test_application_logging_logback_local_decorating, tmpdir: /tmp/tmp593fkzg0
2022-05-19 15:07:55,442 - INFO: ............... collector [10]
2022-05-19 15:07:55,442 - INFO: ................. java_agent [master]
2022-05-19 15:07:55,442 - INFO: ................... java [8]
2022-05-19 15:07:55,443 - INFO: ..................... log_collector_app [master]
2022-05-19 15:07:55,443 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:08:11,295 - INFO: ................... java [11]
2022-05-19 15:08:11,296 - INFO: ..................... log_collector_app [master]
2022-05-19 15:08:11,297 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:08:24,989 - INFO: ................... java [17]
2022-05-19 15:08:24,990 - INFO: ..................... log_collector_app [master]
2022-05-19 15:08:24,991 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:08:37,744 - INFO: ................... java [18]
2022-05-19 15:08:37,745 - INFO: ..................... log_collector_app [master]
2022-05-19 15:08:37,746 - INFO: ....................... embedded_jetty [9.3]
.2022-05-19 15:08:50,804 - INFO: run: /Users/jkeller/code/java-agent-integration-tests/tests/java/functionality/basic_features/logging_test.py:test_application_logging_logback_metrics, tmpdir: /tmp/tmpkks718em
2022-05-19 15:08:50,804 - INFO: ............... collector [10]
2022-05-19 15:08:50,804 - INFO: ................. java_agent [master]
2022-05-19 15:08:50,804 - INFO: ................... java [8]
2022-05-19 15:08:50,804 - INFO: ..................... log_collector_app [master]
2022-05-19 15:08:50,805 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:09:04,740 - INFO: ................... java [11]
2022-05-19 15:09:04,740 - INFO: ..................... log_collector_app [master]
2022-05-19 15:09:04,742 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:09:16,631 - INFO: ................... java [17]
2022-05-19 15:09:16,631 - INFO: ..................... log_collector_app [master]
2022-05-19 15:09:16,633 - INFO: ....................... embedded_jetty [9.3]
2022-05-19 15:09:27,441 - INFO: ................... java [18]
2022-05-19 15:09:27,441 - INFO: ..................... log_collector_app [master]
2022-05-19 15:09:27,443 - INFO: ....................... embedded_jetty [9.3]
.
----------------------------------------------------------------------
Ran 6 tests in 811.589s

OK

Process finished with exit code 0

@jasonjkeller jasonjkeller merged commit bbd4210 into main May 19, 2022
@jasonjkeller jasonjkeller deleted the refactor-log-level branch May 19, 2022 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants