Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Add telemetry for metrics_ingestion_path & json_endpoint_used #1695

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Harkishen-Singh
Copy link
Member

Signed-off-by: Harkishen-Singh harkishensingh@hotmail.com

Relates: #1616

Description

This commit adds telemetry for 2 things:

  1. promscale_metrics_ingestion_path: possible values no_ingestion if Promscale is sitting idle, otherwise protobuf, json, text_plain, text_open_metrics
  2. promscale_metrics_json_endpoint_used: 0 or 1

Along with this, the commit also simplifies the Telemetry implementation for binary cases, removing the need to creating any metrics at all. This affects promscale_rules_enabled & promscale_alerting_enabled.

Merge requirements

Please take into account the following non-code changes that you may need to make with your PR:

  • CHANGELOG entry for user-facing changes
  • Updated the relevant documentation

@Harkishen-Singh Harkishen-Singh self-assigned this Oct 13, 2022
@Harkishen-Singh
Copy link
Member Author

@VineethReddy02 for new telemetry information.

@Harkishen-Singh Harkishen-Singh force-pushed the more_telemetry_points branch 2 times, most recently from ec582e0 to 6eaf1fe Compare October 13, 2022 10:23
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
case "application/openmetrics-text":
telemetry.Registry.Update("metrics_ingestion_path", "text_open_metrics")
default:
telemetry.Registry.Update("metrics_ingestion_path", "none")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: unknown seems better

@@ -124,17 +93,17 @@ func (m *Manager) getReloader(cfg *Config) func() error {

func (m *Manager) updateTelemetry(cfg *Config) {
if cfg.ContainsRules() {
rulesEnabled.Set(1)
telemetry.Registry.Update("rules_enabled", "1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure how I feel about these hardcoded strings in various places

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants