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

PAYARA-3218: Create StructuredDeploymentTracing #4058

Merged
merged 8 commits into from Jul 7, 2019

Conversation

@pdudits
Copy link
Contributor

commented Jun 20, 2019

to collect better contextual information of deployment events

Deployment trace is now printed in single tabular log entry that can be pasted straight into spreadsheet.

This first step redirects former DeploymentTracing into this new class. Next changes will start using StructuredDeploymentTracing directly.

Deployment tracing output before:

...
Container : com.sun.enterprise.web.WebContainer Mark GOT_CONTAINER at 61
Container : com.sun.enterprise.web.WebContainer Mark GOT_DEPLOYER at 61
Mark CONTAINERS_SETUP_DONE at 113
Mark CLASS_LOADER_CREATED at 147
Module ejb-invoker Mark PREPARE at 147
Container : security Mark PREPARE at 147
Container : security Mark PREPARED at 148
Container : web Mark PREPARE at 148
Container : web Mark PREPARED at 149
Module ejb-invoker Mark PREPARE_EVENTS at 149
...

Where each of them was separate log message (with same timestamp) printed via System.out.

Current tracing output is single multiline message that looks like this:

16:27:05.076000000      16:27:05.076000000      APPLICATION ejb-invoker > CONTAINER com.sun.enterprise.web.WebContainer  GOT_CONTAINER           0
16:27:05.076000000      16:27:05.076000000      APPLICATION ejb-invoker > CONTAINER com.sun.enterprise.web.WebContainer  GOT_DEPLOYER            0
16:27:05.076000000      16:27:05.128000000      APPLICATION ejb-invoker CONTAIN_SETUP_DONE            52
16:27:05.128000000      16:27:05.162000000      APPLICATION ejb-invoker CLASS_LOADERER_CREATED             34
16:27:05.162000000      16:27:05.162000000      APPLICATION ejb-invoker > MODULE jb-invoker     PREPARE         0
16:27:05.162000000      16:27:05.162000000      APPLICATION ejb-invoker > MODULE ejb-invoker > CONTAINER security        PREPARE         0
16:27:05.162000000      16:27:05.163000000      APPLICATION ejb-invoker > MODULE ejb-invoker > CONTAINER security        PREPARED                1
16:27:05.163000000      16:27:05.163000000      APPLICATION ejb-invoker > MODULE ejb-invoker > CONTAINER web     PREPARE         0
16:27:05.163000000      16:27:05.164000000      APPLICATION ejb-invoker > MODULE ejb-invoker > CONTAINER web     PREPARED                1
16:27:05.164000000      16:27:05.164000000      APPLICATION ejb-invoker > MODULE ejb-invoker     PREPARE_EVENTS          0
pdudits added 7 commits Jun 20, 2019
PAYARA-3218: Create StructuredDeploymentTracing to collect better con…
…textual information of deployment events

Deployment trace is now printed in single tabular log entry that can be pasted straight into spreadsheet.
PAYARA-3821: Put StructuredDeploymentTracing into module metadata
* Unify registration logic
* Replace usages within DeployCommand
PAYARA-3218: Migrate to structured traces stage 2
* Preparation step is covered
* Attempt at breaking down classpath scanning
@pdudits

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2019

jenkins test please

1 similar comment
@pdudits

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2019

jenkins test please

@cubastanley
Copy link
Contributor

left a comment

Just some queries, nothing major

@Override
public void close() {
if (this.clock == null) {
throw new IllegalArgumentException("DeploymentSpan is already created closed");

This comment has been minimized.

Copy link
@cubastanley

cubastanley Jun 28, 2019

Contributor

By this line, do you mean the span was created in a closed state? Or the created span has already been closed?

This comment has been minimized.

Copy link
@pdudits

pdudits Jun 28, 2019

Author Contributor

Yes, it was created in closed state by means of method createClosed

CREATE_DEPLOY_CONTEXT,
DETERMINE_APP_NAME,
PROVIDE_APPINFO,
READ_DESCRIPTORS, CLEANUP, SWITCH_VERSIONS, DEPLOY, PREPARE, INITIALIZE, REGISTRATION, CLASS_SCANNING, CONTAINER_START, LOAD_METADATA, CREATE_CLASSLOADER, PREPARE_MODULES, LOAD, PREPARE_EVENTS, LOAD_EVENTS;

This comment has been minimized.

Copy link
@cubastanley

cubastanley Jun 28, 2019

Contributor

Can we get these items put onto new lines to prevent excessive/unnecessary line length

@@ -83,7 +88,19 @@

}

public static enum ModuleMark {
public enum AppStage {

This comment has been minimized.

Copy link
@pdudits

pdudits Jun 28, 2019

Author Contributor

This would need bit of cleanup, some of the "stages" can be merged and component used to distinguish them, but we need to collect more diverse traces yet to decide on that.

@@ -57,7 +60,9 @@
*/
public class DeploymentTracing {

This comment has been minimized.

Copy link
@pdudits

pdudits Jun 28, 2019

Author Contributor

Probably should be marked as @Deprecated now.

@Override
public void close() {
if (this.clock == null) {
throw new IllegalArgumentException("DeploymentSpan is already created closed");

This comment has been minimized.

Copy link
@pdudits

pdudits Jun 28, 2019

Author Contributor

Yes, it was created in closed state by means of method createClosed

@AlanRoth
Copy link
Contributor

left a comment

// Portions Copyright [2016-2017] [Payara Foundation and/or its affiliates]

Missed license date in DolProvider

@arjantijms

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

Jenkins test please

@arjantijms arjantijms added this to the 5.193 milestone Jul 5, 2019

@arjantijms arjantijms merged commit e96cccc into payara:master Jul 7, 2019

59 checks passed

Payara Quick Build and Test Quick build and test passed!
Details
security/snyk - api/payara-api/pom.xml (payara-ci) No new issues
Details
security/snyk - api/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/admin/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/admingui/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ant-tasks/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/appclient/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/batch/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/common/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/concurrent/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/connectors/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/core/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/deployment/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/distributions/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ejb/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/extras/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/featuresets/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/flashlight/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/grizzly/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/ha/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/installer/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/javaee-api/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/jdbc/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/jms/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/load-balancer/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/orb/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/osgi-platforms/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/packager/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/payara-appserver-modules/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/persistence/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/registration/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/resources/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/security/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/tests/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/transaction/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/web/pom.xml (payara-ci) No new issues
Details
security/snyk - appserver/webservices/pom.xml (payara-ci) No new issues
Details
security/snyk - copyright/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/admin/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/cluster/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/common/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/core/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/deployment/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/diagnostics/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/distributions/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/flashlight/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/grizzly/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/hk2/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/osgi-platforms/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/packager/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/payara-modules/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/resources-l10n/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/resources/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/security/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/test-utils/pom.xml (payara-ci) No new issues
Details
security/snyk - nucleus/tests/pom.xml (payara-ci) No new issues
Details
security/snyk - pom.xml (payara-ci) No new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.