Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Conversation

@chaitanyaphalak
Copy link
Contributor

No description provided.

Copy link
Contributor

@dtregonning dtregonning left a comment

Choose a reason for hiding this comment

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

Clean up extra spaces and make sure that a metric missing time, cant have proceding metrics names and values


def emit_uptime(tag:, start_time:, labels:)
uptime = @scraped_at - Time.iso8601(start_time)
uptime = @scraped_at - Time.iso8601(start_time) unless start_time.nil?
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove extra space

emit_cpu_metrics tag: tag, metrics: container['cpu'], labels: labels
emit_memory_metrics tag: tag, metrics: container['memory'], labels: labels
emit_uptime tag: tag, start_time: container['startTime'], labels: labels unless container['startTime'].nil?
emit_cpu_metrics tag: tag, metrics: container['cpu'], labels: labels unless container['cpu'].nil?
Copy link
Contributor

Choose a reason for hiding this comment

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

space

@chaitanyaphalak chaitanyaphalak force-pushed the metrics-add-robust-error-handling branch from 08db1ce to 3f90dac Compare July 22, 2019 20:19
Copy link
Contributor

@dtregonning dtregonning left a comment

Choose a reason for hiding this comment

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

Thanks for the updates CP.
Can you add unit tests for metrics not containing time to show behavior of connector handling missing time fields

@chaitanyaphalak chaitanyaphalak force-pushed the metrics-add-robust-error-handling branch 2 times, most recently from acf758d to 679466c Compare July 23, 2019 18:00
@chaitanyaphalak chaitanyaphalak force-pushed the metrics-add-robust-error-handling branch from 679466c to 174b4fa Compare July 23, 2019 18:01
Copy link
Contributor

@dtregonning dtregonning left a comment

Choose a reason for hiding this comment

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

Thank You for adding tests - merge when ready

@chaitanyaphalak chaitanyaphalak merged commit 2365ac6 into develop Jul 25, 2019
@chaitanyaphalak chaitanyaphalak deleted the metrics-add-robust-error-handling branch July 25, 2019 17:13
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