Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with JSON Exporter for Databricks Job Metrics #261

Open
kkuram opened this issue Oct 11, 2023 · 0 comments
Open

Issue with JSON Exporter for Databricks Job Metrics #261

kkuram opened this issue Oct 11, 2023 · 0 comments

Comments

@kkuram
Copy link

kkuram commented Oct 11, 2023

Hello
I am scraping job metrics from databricks api and converting json response using jsonexporter.. i am noticing a problem with conversion, for ex: run_id (number,see below) being converted to like float/Double number. can you help me suggest what is that i am doing wrong or is this a defect in json exporter

config.yml

metrics:
    - name: databricks_job_run_metrics
      type: object
      path: '{.runs[*]}'
      help: Databtricks API 
      labels:
        environment: qa # static label
        run_id: '{.creator_user_name}'
        start_time: '{.start_time}'
        end_time: '{.end_time}'
      values:  
        duration: '{.execution_duration}'
    

input:

"runs": [
        {
            "job_id": 803954388598194,
            "run_id": 420465847726953,
            "creator_user_name": "UID HERE",
            "number_in_job": 420465847726953,
            "original_attempt_run_id": 420465847726953,
            "state": {
                "life_cycle_state": "RUNNING",
                "state_message": "In run",
                "user_cancelled_or_timedout": false
            },
            "overriding_parameters": {
                "notebook_params": {
                    "DUMMY": "VALUE"
                }
            },
            "start_time": 1696909438455,
            "setup_duration": 1000,
            "execution_duration": 10000,
            "cleanup_duration": 0,
            "end_time": 0,
            "trigger": "ONE_TIME",
            "run_name": "MASKED",
            "run_page_url": "MASK",
            "run_type": "JOB_RUN",
            "format": "MULTI_TASK"
        }]

OUTPUT: databricks_job_run_metrics_duration{run_id="1.077467212586853e+15"} 10000
expected o/p: databricks_job_run_metrics_duration{run_id="420465847726953"} 10000

@kkuram kkuram changed the title JSON Exporter for Databricks Job Metrics Issue with JSON Exporter for Databricks Job Metrics Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant