class PrometheusConfiguration {

	private static final Logger LOGGER = LoggerFactory.getLogger(PrometheusConfiguration.class);

	@Value("${prometheus.job.name}")
	private String prometheusJobName;

	@Value("${prometheus.grouping.key}")
	private String prometheusGroupingKey;

	@Value("${prometheus.pushgateway.url}")
	private String prometheusPushGatewayUrl;

	private final Map<String, String> groupingKey = new HashMap<>();

	private PushGateway pushGateway;

	private CollectorRegistry collectorRegistry;

	@PostConstruct
	public void init() {<FILL_FUNCTION_BODY>}

	@Scheduled(fixedRateString = "${prometheus.push.rate}")
	public void pushMetrics() {
		try {
			pushGateway.pushAdd(collectorRegistry, prometheusJobName, groupingKey);
		}
		catch (Throwable ex) {
			LOGGER.error("Unable to push metrics to Prometheus Push Gateway", ex);
		}
	}

}

		pushGateway = new PushGateway(prometheusPushGatewayUrl);
		groupingKey.put(prometheusGroupingKey, prometheusJobName);
		PrometheusMeterRegistry prometheusMeterRegistry = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
		collectorRegistry = prometheusMeterRegistry.getPrometheusRegistry();
		Metrics.globalRegistry.add(prometheusMeterRegistry);
	
<no_super_class>