Skip to content

Commit

Permalink
added code to check micrometer metrics for non mendix cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravmendix committed Nov 27, 2023
1 parent 9b8f652 commit 080786d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions buildpack/telemetry/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,18 @@ def _micrometer_runtime_requirement(runtime_version):

def micrometer_metrics_enabled(runtime_version):
"""Check for metrics from micrometer."""
return bool(get_micrometer_metrics_url()) and _micrometer_runtime_requirement(
runtime_version
)
logging.info("checking is micrometer metrics enabled")
micrometer_enabled=False
if(_micrometer_runtime_requirement(runtime_version))
logging.info("satisfies micrometer runtime requirement")
if(bool(get_micrometer_metrics_url()))
logging.info("Found micrometer metrics url configured")
micrometer_enabled = True
elif(strtobool(os.getenv("NON_MENDIX_PUBLIC_CLOUD","false")))
logging.info("micrometer for non mendix public cloud")
micrometer_enabled = True
return micrometer_enabled



def configure_metrics_registry(m2ee):
Expand Down

0 comments on commit 080786d

Please sign in to comment.