Troubleshoot Streaming
Profiles By Using Stellar

Troubleshooting issues when programming against a live stream of data can be difficult.
The Stellar REPL (an interactive top level or language shell) is a powerful tool to help work
out the kinds of enrichments and transformations that are needed. The Stellar REPL can also be
used to help when developing profiles for the profiler.

Follow these steps in the Stellar REPL to see how it can be used to help create
profiles.

Use the SHELL_EDIT function to create a simple hello-world profile that will count the
number of messages for each ip_src_addr. The SHELL_EDIT function will
open an editor into which you can add the following profiler configuration.

List the system time, which is the time at which you are processing the data.

List the event time, which is the time contained in the data itself.

Create the profile execution environment.

The profiler will output the number of profiles that have been defined, the number of
messages that have been applied, and the number of routes that have been followed. A route
is defined when a message is applied to a specific profile.

If a message is not needed by any profile, then there are no routes.

If a message is needed by one profile, then one route has been followed.

If a message is needed by two profiles, then two routes have been followed.

A flush occurs in the profiler every 15 minutes. The result is a list of profile
measurements. Each measurement is a map containing detailed information about the profile
data that has been generated. The value field is written to HBase when
running the profiler in either Storm or Spark.

There will always be one measurement for each profile,
entity pair. This profile counts the number of messages by IP source
address. Notice that the value is 3 for the entity
10.0.0.1 because we applied 3 messages with an
ip_src_addr of 10.0.0.1.

In addition to testing with mock data, you can also apply real, live telemetry to your
profile.