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

Add prometheus api #439

Merged
merged 3 commits into from
Jul 28, 2022
Merged

Add prometheus api #439

merged 3 commits into from
Jul 28, 2022

Conversation

qmhu
Copy link
Member

@qmhu qmhu commented Jul 27, 2022

What type of PR is this?

Add prometheus api

What this PR does / why we need it:

Add prometheus api for crane server

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@qmhu qmhu requested a review from zsnmwy July 27, 2022 12:10
@qmhu qmhu linked an issue Jul 27, 2022 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Jul 27, 2022

🎉 Successfully Build Images.

Overview: https://finops.coding.net/public-artifacts/gocrane/crane/packages

Image Pull Command
crane-agent:pr-439-03f3c70 docker pull finops-docker.pkg.coding.net/gocrane/crane/crane-agent:pr-439-03f3c70
dashboard:pr-439-03f3c70 docker pull finops-docker.pkg.coding.net/gocrane/crane/dashboard:pr-439-03f3c70
metric-adapter:pr-439-03f3c70 docker pull finops-docker.pkg.coding.net/gocrane/crane/metric-adapter:pr-439-03f3c70
craned:pr-439-03f3c70 docker pull finops-docker.pkg.coding.net/gocrane/crane/craned:pr-439-03f3c70

pkg/server/handler/prometheus/prometheus.go Outdated Show resolved Hide resolved
pkg/server/handler/prometheus/prometheus.go Outdated Show resolved Hide resolved
Comment on lines 20 to 21
func ParseTimestamp(ts string) (time.Time, error) {
i, err := strconv.ParseInt("ts", 10, 64)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
func ParseTimestamp(ts string) (time.Time, error) {
i, err := strconv.ParseInt("ts", 10, 64)
func ParseTimestamp(ts string) (time.Time, error) {
i, err := strconv.ParseInt(ts, 10, 64)

@qmhu qmhu merged commit 47df8bf into gocrane:main Jul 28, 2022
@qmhu qmhu linked an issue Aug 3, 2022 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

Support Recommendation WebAPI for Crane Server Support Prometheus API for Crane Server
2 participants