Class NoopTagMapBuilder

    • Constructor Detail

      • NoopTagMapBuilder

        private NoopTagMapBuilder()
    • Method Detail

      • put

        public TagContextBuilder put​(TagKey key,
                                     TagValue value)
        Description copied from class: TagContextBuilder
        Adds the key/value pair regardless of whether the key is present.

        For backwards-compatibility this method still produces propagating Tags.

        Equivalent to calling put(key, value, TagMetadata.create(TagTtl.UNLIMITED_PROPAGATION)).

        Specified by:
        put in class TagContextBuilder
        Parameters:
        key - the TagKey which will be set.
        value - the TagValue to set for the given key.
        Returns:
        this
      • put

        public TagContextBuilder put​(TagKey key,
                                     TagValue value,
                                     TagMetadata tagMetadata)
        Description copied from class: TagContextBuilder
        Adds the key/value pair and metadata regardless of whether the key is present.
        Overrides:
        put in class TagContextBuilder
        Parameters:
        key - the TagKey which will be set.
        value - the TagValue to set for the given key.
        tagMetadata - the TagMetadata associated with this Tag.
        Returns:
        this
      • buildScoped

        public Scope buildScoped()
        Description copied from class: TagContextBuilder
        Enters the scope of code where the TagContext created from this builder is in the current context and returns an object that represents that scope. The scope is exited when the returned object is closed.
        Specified by:
        buildScoped in class TagContextBuilder
        Returns:
        an object that defines a scope where the TagContext created from this builder is set to the current context.