Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Conditional Trace is a service located on a service context, and the output generated from a trace is sent to that service context.

If you want to enable conditional trace, you are required to take the following steps.

  1. Use the mzsh topo command to add the akka service as shown below.  You must specify a name for the akka service, e g akka-trace-cluster, and a value for startup-natures. The startup-natures must have the same value as the startup-natures in the SC on which you are running Conditional Trace.

    mzsh topo set -l services:custom/obj:akka '{      
          <akka service name> {
            template: "1/standard/basic"
            config {
              startup-natures: [<startup-nature>]
            }
          }
    }'

    See the example below, where the akka service is named akka-trace-cluster.

    Example - Adding the akka service

    mzsh topo set -l services:custom/obj:akka '{      
           akka-trace-cluster {
            template: "1/standard/basic"
            config {
              startup-natures: [ct_cluster]
            }
          }
    }'
  2. Use the mzsh topo command to create a new Service Context, which will be attached to ct_cluster. You must use the same startup-natures name that you enter for the akka service in step 1.

    mzsh topo set -l pico:sc-ct '{
           template:mz.standard-sc
             config.properties {
             mz.servicehost.port.range:"<port range>"
             mz.servicehost.natures:"<startup-natures>"
           }
    }'

    See the example below, where the service context is named sc-ct.

    Example - Creating the Service Context

    mzsh topo set -l pico:sc-ct '{
           template:mz.standard-sc
             config.properties {
             mz.servicehost.port.range:"7001-7050"
             mz.servicehost.natures:"ct_cluster"
           }
    }'
  3. Use the mzsh topo command to add the conditional trace service, which must be named trace. You must use the same akka service name that you enter for the akka configuration in step 2, which you must also enter as the value for the akka-cluster, shown below as <akka service name>.

    mzsh topo set -l services:custom/obj:conditional-trace '{      
          trace {
            start-after=["akka/<akka service name>"]
            template: "1/standard/basic"
            config {
              akka-cluster: "<akka service name>"
            }
          }
    }'

    See the example below, where the akka service name is akka-trace-cluster, which is also entered as the value for the akka-cluster.

    Example - Adding the conditional trace service

    mzsh topo set -l services:custom/obj:conditional-trace '{      
           trace {
            start-after=["akka/akka-trace-cluster"]
            template: "1/standard/basic"
            config {
              akka-cluster: "akka-trace-cluster"
            }
          }
    }'
  4. Startup the SCs and startup the conditional trace service:

    $ mzsh startup platform sc-ct
    $ mzsh system start
    $ mzsh service start 
  • No labels