Author |
Message
|
serpota |
Posted: Tue Mar 27, 2007 1:46 am Post subject: MB Trace node - Development and production environments. |
|
|
Voyager
Joined: 26 May 2006 Posts: 85
|
Is it possible to have just one message flow, - thus only one BAR file -,
containing a Trace Node
and forward the trace to a file in the "development" environment,
but do not have the trace in the "production" environment ?
MB is version 6.
We are opening the BAR file Properties
and the "Configure" part of it has a "File Path" property
but there is not a "Destination" property
( which the Trace Node had .. )
Thanks. |
|
Back to top |
|
 |
PieterV |
Posted: Tue Mar 27, 2007 3:27 am Post subject: |
|
|
Disciple
Joined: 04 Jan 2006 Posts: 164 Location: Belgium
|
What happens if you leave the file path empty?
Does it give an error or will it do as you want (not writing the trace).
Another possiblity is to attach the trace node to a label and you only go to that label based on a user defined property. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Mar 27, 2007 3:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Even if you change the trace mode, file path, and pattern to blank on a deploy, the trace node is still there and will still be invoked and still incur performance costs.
You should evaluate the performance difference with the node there and with the node removed entirely from the flow, and decide if you can live it or not. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
serpota |
Posted: Tue Mar 27, 2007 4:50 am Post subject: |
|
|
Voyager
Joined: 26 May 2006 Posts: 85
|
PieterV wrote: |
What happens if you leave the file path empty?
Does it give an error or will it do as you want (not writing the trace).
Another possiblity is to attach the trace node to a label and you only go to that label based on a user defined property. |
As fas as I can see, no error is reported to teh MB logs,
and no LOG file is written, so it seems to work.
Yes, we would like to have the trace node accessed at Development
and not at Production - do you mean to introduce some kind of "IF" in the flow ?
Thanks. |
|
Back to top |
|
 |
serpota |
Posted: Tue Mar 27, 2007 4:52 am Post subject: |
|
|
Voyager
Joined: 26 May 2006 Posts: 85
|
jefflowrey wrote: |
Even if you change the trace mode, file path, and pattern to blank on a deploy, the trace node is still there and will still be invoked and still incur performance costs.
You should evaluate the performance difference with the node there and with the node removed entirely from the flow, and decide if you can live it or not. |
Thanks, Jeff - we understand there are performance costs.
But we prefer to do the things step by step :
1) first we learn how to trace/not to trace on both environments (if it is possible)
2) second we evaluate the CPU cost due to {$Root} parsing ...
Thanks. |
|
Back to top |
|
 |
EddieA |
Posted: Tue Mar 27, 2007 9:55 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
The trace node will create a file, only if the path is "valid", it will not create directories.
So, for your Test environment, make sure the directory path is correct. Then, on your Production environment, ensure that the directory does NOT exist.
However, as pointed out, you will still have some overhead for the Trace node.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
billybong |
Posted: Tue Mar 27, 2007 12:54 pm Post subject: |
|
|
 Disciple
Joined: 22 Jul 2005 Posts: 150 Location: Stockholm, Sweden
|
Use a filter before the trace which checks the broker name. If the name is the same as your production broker, dont invoke the tracenode. If it isn't go trough the node and then the same path. _________________ IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Integration Developer V6.0
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere DataPower |
|
Back to top |
|
 |
serpota |
Posted: Thu Mar 29, 2007 1:41 am Post subject: |
|
|
Voyager
Joined: 26 May 2006 Posts: 85
|
I got the idea.
Guess we shall do the "if" or "filter" solution, as no parsing is involved.
Thank you all. |
|
Back to top |
|
 |
PieterV |
Posted: Thu Mar 29, 2007 5:29 am Post subject: |
|
|
Disciple
Joined: 04 Jan 2006 Posts: 164 Location: Belgium
|
serpota wrote: |
I got the idea.
Guess we shall do the "if" or "filter" solution, as no parsing is involved.
Thank you all. |
yes, i would do that too.
use a routetolabel node and 2 labels: one for dev, one for production. The one for dev contains the trace node, the one for production contains nothing (or perhaps the rest of the flow, if the trace node is not the endpoint). |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu Mar 29, 2007 9:43 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
billybong wrote: |
Use a filter before the trace which checks the broker name. If the name is the same as your production broker, dont invoke the tracenode. If it isn't go trough the node and then the same path. |
In my opinion it is better to use UDP for it.
Sometimes you have to trace flow on production.
If you use broker name behavior of flow is hardcoded.
If you use UDP you can set trace for DEV or PRD or both of them _________________ Marcin |
|
Back to top |
|
 |
murdeep |
Posted: Thu Mar 29, 2007 10:41 am Post subject: |
|
|
Master
Joined: 03 Nov 2004 Posts: 211
|
Here's an idea. Have no trace nodes in the flow and use mqsichangetrace at runtime to trace the flow. I've never had to use trace nodes in a flow to determine what it is doing. I simply have a batch file (startTrace) to enable a trace and another (stopTrace) to stop the tracing. Then I read the trace, everything you want to know is there.
Example w2k bat files
Code: |
rem %1 Broker
rem %2 EG
mqsichangetrace %1 -u -e %2 -r
mqsichangetrace %1 -u -e %2 -l debug -c 5000 |
Code: |
rem %1 Broker
rem %2 EG
mqsichangetrace %1 -u -e %2 -l none -c 5000
mqsireadlog %1 -e %2 -o readlog.out -u -f
mqsiformatlog -i readlog.out -o readlog.txt
start notepad readlog.txt |
You can fine tune the script to trace just a flow as opposed to every flow in the EG but you get the idea. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Thu Mar 29, 2007 11:52 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
In my opinion broker trace is fine for specific situation (when you raise PMR for instance).
I use it for problem determination with stable flows.
I prefer Trace node to log my custom data. With Trace node I can determine what kind of information I have in file and it's structure. _________________ Marcin |
|
Back to top |
|
 |
|