Skip to content

Commit

Permalink
Merge pull request #11 from pauljwil/pwilliams-o11ydocs-5992
Browse files Browse the repository at this point in the history
Apply light editing to README
  • Loading branch information
breedx-splk authored Jul 23, 2024
2 parents dca7557 + f85836b commit 17f2b3e
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# SignalFlow Java Client

This is a client for [SignalFlow](https://dev.splunk.com/observability/docs/signalflow)
that lets you stream and analyze metric data in real-time for your organization.
This is a client for [SignalFlow](https://dev.splunk.com/observability/docs/signalflow),
which enables you to stream and analyze your organization's metric data in real time.


## Executing SignalFlow computations
## Run SignalFlow computations

SignalFlow is SignalFx's real-time analytics computation language. The
SignalFlow is the SignalFx real-time analytics computation language. The
SignalFlow API allows SignalFx users to execute real-time streaming analytics
computations on the SignalFx platform. For more information, head over to our
Developers documentation:
computations on the SignalFx platform. For more information, see the Splunk
Observability Cloud developer documentation:

* [SignalFlow Overview](https://dev.splunk.com/observability/docs/signalflow/)
* [SignalFlow API Reference](https://dev.splunk.com/observability/reference/api/signalflow/latest)

Executing a SignalFlow program is very simple with this client library:
The following example demonstrates how to run a SignalFlow program using the
Java client library:

```java
String program = "data('cpu.utilization').mean().publish()";
SignalFlowClient flow = new SignalFlowClient("MY_TOKEN");
System.out.println("Executing " + program);
SignalFlowClient flow = new SignalFlowClient("<token>");
System.out.println("Running " + program);
Computation computation = flow.execute(program);
for (ChannelMessage message : computation) {
switch (message.getType()) {
Expand All @@ -39,9 +40,10 @@ for (ChannelMessage message : computation) {
}
```

Metadata about the timeseries is received from the iterable stream, and it
is also automatically intercepted by the client library and made available through
the ``Computation`` object returned by ``execute()``:
If you need to receive timeseries metadata, you can use the Java client library
to provide access to this information using the ``Computation`` object returned
by the ``execute()`` method. To receive timeseries metadata, change the
``DATA_MESSAGE`` case to the following:

```java
case DATA_MESSAGE:
Expand Down

0 comments on commit 17f2b3e

Please sign in to comment.