• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by Andreas B. · Mar 27, 2015 at 03:20 AM ·

Collecting Information about Deployment Units for Servlets/EJBs in Java EE Environments

Hi,

is there any chance to get the deployment unit (WAR/EAR/JAR) of a Servlet/EJB as part of a purepath? Within a running Java EE application you can usually get it using JNDI calls such as:

final InitialContext initialContext = new InitialContext();
APP_NAME = (String) initialContext.lookup("java:app/AppName");
MODULE_NAME = (String) initialContext.lookup("java:module/ModuleName");

Is there any default Sensor available that can collect this information? Or is it possible to develop a custom sensor to associate this information with a purepath of a transaction?

Thanks in advance!

Andreas

 

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

4 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Andreas B. · May 12, 2015 at 02:23 PM

Hi Sandeep,

we did a test with a simple web application and the web application id seems to come from the display-name element in the web.xml (in this case SpecjInsuranceJSF):

We also found that on the top-level of a purepath there is an application attribute - that seems to denote the application id of an EAR file:

However, the semantics of this top level element are unclear to me as a purepath might span multiple tiers and the application id might change for each tier. I would have expected this attribute to be more local to the actual classes/methods instrumented by dynatrace. Maybe someone from dynatrace could shed some light on this.

 

Cheers,

Andreas

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Sandeep P. · May 09, 2015 at 03:37 AM

Hi Andreas,

Even i have the same question, were you able to figure out, where this Web Application ID comes from?

-Sandeep.

 

 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Andreas B. · Mar 28, 2015 at 03:19 AM

Hi Wolfgang,

Thanks for your feedback! I saw the application ID parameter for web applications in the pure path details but I am not quite sure where this value comes from - is it the value specified in the application.xml file of an EAR?:

<application id= "Application_ID" version= "1.4" xmlns= "http://java.sun.com/xml/ns/j2ee" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" >...

Or is it the displayname specified in the web.xml (e.g., if a web application is not packaged in an EAR)?:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"; version=?2.5?>

<display-name>A Web Application</display-name>

If dynatrace uses the web.xml data we just need a solution for EJBs and I think that using an EJBInterceptor that sets this information as string parameters for every request might be work around for now. However, I think if you are using the application ID from an EAR you might be able to specify it in the pure path details for EJB invocations as well.

 

Cheers,

Andreas

 

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Wolfgang G. · Mar 28, 2015 at 12:52 AM

Hi,

After checking with our R&D team the answer is that we show the application ID for web apps as part of the PurePath details (or, for example, in the web request dashlet and also as an available measure for business transactions). For other metadata, you'd need to call some dummy method to pass in the values you want to record as string parameters - however I would be a bit reluctant to do that on every request, as creating the initial content also takes some ms.

Hope that helps,
-Wolfgang

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

are the webserver agents visible in the transaction flow, aside from the .net agents ??

Cannot drill-down from measure health dashboard

Make release notes available for fixpacks and updates

Collector Equation - How do you anticipate the capacity of new agents?

Squid Reverse Proxy Instrumentation

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A