Class CinnamonAttributes


  • public class CinnamonAttributes
    extends java.lang.Object
    Attributes for programmatic configuration of Cinnamon instrumentation for Akka Streams.
    • 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>
      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.
      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).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CinnamonAttributes

        public CinnamonAttributes()
    • 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 instance
        name - set reportByName and the reporting name directly (when non-null)
        tags - extra tags to be added to stream identity
        perOperator - 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 stream
        traceable - 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 instance
        name - set reportByName and the reporting name directly (when non-null)
        tags - extra tags to be added to stream identity
        perOperator - 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 stream
        traceable - 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 Sink
        Mat1 - type of materialized value for Source
        Mat2 - type of materialized value for Sink
        Parameters:
        source - the Source graph to be connected and run
        sink - the Sink graph to be connected using runWith
        materializer - the stream Materializer
        instrumented - the Instrumented attribute providing instrumentation settings
        Returns:
        the materialized value of the Sink