Class ShardingStrategy

    • Constructor Detail

      • ShardingStrategy

        public ShardingStrategy()
        No args constructor for use in serialization
    • Method Detail

      • getMode

        public String getMode()
        mode defines the sharding mode. Can be 'Address' or 'Topology'.


        'Address' is the default mode and distributes targets across shards based on a hash of the target address.


        'Topology' enables zone-aware sharding where each shard is assigned to a specific topology zone and only scrapes targets in that zone. (Alpha) Using the 'Topology' mode requires the `PrometheusTopologySharding` feature gate to be enabled.

      • setMode

        public void setMode​(String mode)
        mode defines the sharding mode. Can be 'Address' or 'Topology'.


        'Address' is the default mode and distributes targets across shards based on a hash of the target address.


        'Topology' enables zone-aware sharding where each shard is assigned to a specific topology zone and only scrapes targets in that zone. (Alpha) Using the 'Topology' mode requires the `PrometheusTopologySharding` feature gate to be enabled.

      • getTopology

        public TopologyShardingStrategy getTopology()
        ShardingStrategy defines the sharding strategy for Prometheus.
      • setTopology

        public void setTopology​(TopologyShardingStrategy topology)
        ShardingStrategy defines the sharding strategy for Prometheus.
      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)