Class CinnamonAttributes
- java.lang.Object
-
- com.lightbend.cinnamon.akka.stream.CinnamonAttributes
-
public class CinnamonAttributes extends java.lang.Object
Attributes for programmatic configuration of Cinnamon instrumentation for Akka Streams.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CinnamonAttributes.FlowWithInstrumented<In,Out,Mat>
Implicit convenience extension for adding Instrumented attributes to flows.static class
CinnamonAttributes.GraphWithInstrumented<Mat>
Implicit convenience extension for adding Instrumented attributes to runnable graphs.static class
CinnamonAttributes.Instrumented
Attribute for specifying Cinnamon instrumentation settings directly on a runnable graph.static class
CinnamonAttributes.SourceWithInstrumented<Out,Mat>
Implicit convenience extension for adding Instrumented attributes to sources.
-
Constructor Summary
Constructors Constructor Description CinnamonAttributes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static akka.stream.Attributes
instrumented(boolean reportByName, boolean reportByInstance, java.lang.String name, scala.collection.immutable.Map<java.lang.String,java.lang.String> tags, boolean perOperator, boolean perConnection, boolean perBoundary, boolean perFlow, boolean substreams, boolean traceable)
Create Instrumented Attributes for Cinnamon instrumentation settings.static akka.stream.Attributes
instrumentedByInstance()
Java API: create Instrumented attribute with report by instance setting.static akka.stream.Attributes
instrumentedByName()
Java API: create Instrumented attribute with report by name setting (using name attribute on graph).static akka.stream.Attributes
instrumentedByName(java.lang.String name)
Java API: create Instrumented attribute with report by name setting.static akka.stream.Attributes
instrumentedByNameAndInstance()
Java API: create Instrumented attribute with both report by name and report by instance settings.static akka.stream.Attributes
instrumentedByNameAndInstance(java.lang.String name)
Java API: create Instrumented attribute with both report by name and report by instance settings.static <Out,Mat1,Mat2>
Mat2instrumentedRunWith(akka.stream.Graph<akka.stream.SourceShape<Out>,Mat1> source, akka.stream.Graph<akka.stream.SinkShape<Out>,Mat2> sink, akka.stream.Materializer materializer, CinnamonAttributes.Instrumented instrumented)
Java API: call runWith on a Source and Sink with instrumentation settings.static CinnamonAttributes.Instrumented
instrumentedWith(boolean reportByName, boolean reportByInstance, java.lang.String name, scala.collection.immutable.Map<java.lang.String,java.lang.String> tags, boolean perOperator, boolean perConnection, boolean perBoundary, boolean perFlow, boolean substreams, boolean traceable)
Create Instrumented attribute for Cinnamon instrumentation settings.static CinnamonAttributes.Instrumented
isInstrumented()
Java API: create a new Instrumented attribute with default settings (telemetry not enabled).
-
-
-
Method Detail
-
instrumented
public static akka.stream.Attributes instrumented(boolean reportByName, boolean reportByInstance, java.lang.String name, scala.collection.immutable.Map<java.lang.String,java.lang.String> tags, boolean perOperator, boolean perConnection, boolean perBoundary, boolean perFlow, boolean substreams, boolean traceable)
Create Instrumented Attributes for Cinnamon instrumentation settings.- Parameters:
reportByName
- whether to report metrics by name (using name attribute on graph by default)reportByInstance
- whether to report metrics by instancename
- set reportByName and the reporting name directly (when non-null)tags
- extra tags to be added to stream identityperOperator
- whether to record metrics per-operator (throughput and processing time)perConnection
- whether to record metrics per-connection (throughput and processing time)perBoundary
- whether to record metrics per-boundary (throughput)perFlow
- whether to record metrics per-flow (end-to-end flow time)substreams
- whether to also instrument substreams materialized by this streamtraceable
- whether to include the stream in traces- Returns:
- Instrumented Attributes with Cinnamon settings
-
instrumentedWith
public static CinnamonAttributes.Instrumented instrumentedWith(boolean reportByName, boolean reportByInstance, java.lang.String name, scala.collection.immutable.Map<java.lang.String,java.lang.String> tags, boolean perOperator, boolean perConnection, boolean perBoundary, boolean perFlow, boolean substreams, boolean traceable)
Create Instrumented attribute for Cinnamon instrumentation settings.- Parameters:
reportByName
- whether to report metrics by name (using name attribute on graph by default)reportByInstance
- whether to report metrics by instancename
- set reportByName and the reporting name directly (when non-null)tags
- extra tags to be added to stream identityperOperator
- whether to record metrics per-operator (throughput and processing time)perConnection
- whether to record metrics per-connection (throughput and processing time)perBoundary
- whether to record metrics per-boundary (throughput)perFlow
- whether to record metrics per-flow (end-to-end flow time)substreams
- whether to also instrument substreams materialized by this streamtraceable
- whether to include the stream in traces- Returns:
- Instrumented attribute with Cinnamon settings
-
isInstrumented
public static CinnamonAttributes.Instrumented isInstrumented()
Java API: create a new Instrumented attribute with default settings (telemetry not enabled).- Returns:
- default Instrumented attribute
-
instrumentedByName
public static akka.stream.Attributes instrumentedByName()
Java API: create Instrumented attribute with report by name setting (using name attribute on graph).- Returns:
- Attributes for instrumented with report by name
-
instrumentedByName
public static akka.stream.Attributes instrumentedByName(java.lang.String name)
Java API: create Instrumented attribute with report by name setting.- Parameters:
name
- name of graph to use for instrumentation- Returns:
- Attributes for instrumented with report by name
-
instrumentedByInstance
public static akka.stream.Attributes instrumentedByInstance()
Java API: create Instrumented attribute with report by instance setting.- Returns:
- Attributes for instrumented with report by instance
-
instrumentedByNameAndInstance
public static akka.stream.Attributes instrumentedByNameAndInstance()
Java API: create Instrumented attribute with both report by name and report by instance settings.- Returns:
- Attributes for instrumented with report by name and instance
-
instrumentedByNameAndInstance
public static akka.stream.Attributes instrumentedByNameAndInstance(java.lang.String name)
Java API: create Instrumented attribute with both report by name and report by instance settings.- Parameters:
name
- name of graph to use for instrumentation- Returns:
- Attributes for instrumented with report by name and instance
-
instrumentedRunWith
public static <Out,Mat1,Mat2> Mat2 instrumentedRunWith(akka.stream.Graph<akka.stream.SourceShape<Out>,Mat1> source, akka.stream.Graph<akka.stream.SinkShape<Out>,Mat2> sink, akka.stream.Materializer materializer, CinnamonAttributes.Instrumented instrumented)
Java API: call runWith on a Source and Sink with instrumentation settings.- Type Parameters:
Out
- type of element for Source and SinkMat1
- type of materialized value for SourceMat2
- type of materialized value for Sink- Parameters:
source
- the Source graph to be connected and runsink
- the Sink graph to be connected using runWithmaterializer
- the stream Materializerinstrumented
- the Instrumented attribute providing instrumentation settings- Returns:
- the materialized value of the Sink
-
-