question

Simon G. avatar image
Simon G. asked ·

dtCookie is breaking applications

The dtcookie is breaking the way our application work. When the agent is activate it is injecting a dtCookie before all the other Set-Cookie in the Response Header of all HTTP request.

In the following response you will see that there is now two Set-Cookie values. Our applications is taking the first occurences of the Set-Cookie to retreive the JSESSIONID and now since it is not the first, the applications are not able to retreive the right sessionID.

Is there a way to tell Dynatrace to inject the dtCookie after all the other Set-Cookie?

Thanks

2017-05-17 16:22:38.823 [main] DEBUG org.apache.http.wire:72 - << "HTTP/1.1 200 OK[\r][\n]"

2017-05-17 16:22:38.826 [main] DEBUG org.apache.http.wire:72 - << "Date: Wed, 17 May 2017 20:22:40 GMT[\r][\n]"

2017-05-17 16:22:38.827 [main] DEBUG org.apache.http.wire:72 - << "Content-Length: 343[\r][\n]"

2017-05-17 16:22:38.827 [main] DEBUG org.apache.http.wire:72 - << "Content-Type: text/html; charset=ISO-8859-1[\r][\n]"

2017-05-17 16:22:38.827 [main] DEBUG org.apache.http.wire:72 - << "Set-Cookie: dtCookie=C29F390DF76BFE8979DBC3B3BB8BF01A|X2RlZmF1bHR8MQ; path=/[\r][\n]"

2017-05-17 16:22:38.827 [main] DEBUG org.apache.http.wire:72 - << "Set-Cookie: JSESSIONID=EOIYE6e4ItaMuiGOk-RMnGBrloCr8FJBx6gaAHSnpv8THNjxJG2x!1554166324; path=/OrderManagement; HttpOnly[\r][\n]"

2017-05-17 16:22:38.827 [main] DEBUG org.apache.http.wire:72 - << "X-ORACLE-DMS-ECID: 76efb822-cdf9-4f3d-a540-a943e51fb285-000103b7[\r][\n]"

2017-05-17 16:22:38.828 [main] DEBUG org.apache.http.wire:72 - << "OMSBuildVersion: 7.3.0.1.4[\r][\n]"

2017-05-17 16:22:38.828 [main] DEBUG org.apache.http.wire:72 - << "X-dynaTrace-JS-Agent: true[\r][\n]"

2017-05-17 16:22:38.828 [main] DEBUG org.apache.http.wire:72 - << "[\r][\n]"

6.5agentcollectorclient
1 comment
10 |2000000 characters needed characters left characters exceeded

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

I can´t think of a way to insert the cookie at a specific Point with either normal or debug options available in the client. Maybe open a support case to check with if there is another option, if no answers come in.

1 Like 1 · ·
Chaitanya S. avatar image
Chaitanya S. answered ·

Thanks @Enrioco. It worked

Share
10 |2000000 characters needed characters left characters exceeded

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

Chaitanya S. avatar image
Chaitanya S. answered ·

Is there a way to turn off sending the cookie from dynatrace Appmon?

3 comments Share
10 |2000000 characters needed characters left characters exceeded

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

Hello @Chaitanya S.

Why do you want to stop cookie?

To identify a visit, AppMon uses cookies. Therefore it is a technical necessity that a Webserver Agent set a temporary session cookie; otherwise UEM cannot measure a user's performance experience. This cookie is sent on the first web request and expires when the browser is closed. It is non-persistent and is not used for ad tracking. AppMon sets these first-party cookies for the sole purpose of application performance management, not for tracking a user's purchasing bias or click behavior.

Have a look on the below link for more insight.

https://www.dynatrace.com/support/doc/appmon/data-privacy-and-security/privacy-and-security/cookies/

Regards,

Babar

1 Like 1 · ·

we have some legacy app which allows only one cookie. dyntrace is taking that 1 cookie and causing app to be stopped. Hence, we don't want cookie to be injected

1 Like 1 · ·

The only way to stop sending the dtCookie is to disable User Experience Management for your application (in System Profile settings).

1 Like 1 · ·
Enrico F. avatar image
Enrico F. answered ·

If your app depends on the ordering of individual (and differently named) cookies I would say it is violating the HTTP specification and needs fixed.

See also RFC 6265 Section 4.2.2

   Although cookies are serialized linearly in the Cookie header,
   servers SHOULD NOT rely upon the serialization order.  In particular,
   if the Cookie header contains two cookies with the same name (e.g.,
   that were set with different Path or Domain attributes), servers
   SHOULD NOT rely upon the order in which these cookies appear in the
   header.

1 comment Share
10 |2000000 characters needed characters left characters exceeded

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

Thanks for the answer, those applications were made a long time ago and never got any issue before. I know it may be a bad design and they should definitely be updated but in the meantime is there a way to change the order or something in Dynatrace UEM to make the dtCookie header come after the existing one?

1 Like 1 · ·