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

Monitoring: fix error on Stackdriver exporter #1479

Merged

Conversation

aLekSer
Copy link
Collaborator

@aLekSer aLekSer commented Apr 17, 2020

Zero value cannot be used as the only value for view.Distribution().

Closes #1330

@aLekSer
Copy link
Collaborator Author

aLekSer commented Apr 17, 2020

Also found some useful examples. First uses new version of client-go, so we will need to update metrics with update to 1.15:
https://github.com/knative/pkg/blob/3c828cf99f67f8066e956490f634ebe90abd6892/metrics/reflector_test.go
Example of how distribution could be created:
https://github.com/knative/pkg/blob/4e57475bc87c1aba3e7fcc0207b593dc7186eb83/metrics/workqueue.go#L78
Will add screenshots from Grafana and move to Ready to Review state.
Stackdriver exporter works without errors now. simple-udp with 2 GameServers, Count by Status:
GameServersCount Stackdriver
Ready=2
Scheduled=0

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 10ea39d5-e1f9-4b29-88b9-eacb388bc306

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1479/head:pr_1479 && git checkout pr_1479
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-df9fe2b

@aLekSer
Copy link
Collaborator Author

aLekSer commented Apr 22, 2020

On Grafana Workerqueue metrics, I have changed looks the same as before.
Screenshot 2020-04-22 at 23 04 39
However I got a strange issue on GameServers dashboard, that could be caused by Grafana update:

Dashboard init (failed)
Failed create dashboard model
undefined is not iterable (cannot read property Symbol(Symbol.iterator))

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: cf816f2b-368f-4a67-a262-9f27b5c3e3b8

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1479/head:pr_1479 && git checkout pr_1479
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-43e81ce

@markmandel
Copy link
Member

/assign @cyriltovena

Can you review? I've no idea what any of this means 😄

}))

runtime.Must(view.Register(&view.View{
Name: "k8s_client_cache_list_items",
Measure: cacheListItemCountStats,
Description: "Count of items in a list from the Kubernetes API.",
Aggregation: view.Distribution(0),
Aggregation: view.Distribution(0.00001),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder why past me didn't put any buckets here ?

I think we should have 0,10,50,100,150,250,300.

}))

runtime.Must(view.Register(&view.View{
Name: "k8s_client_cache_watch_events",
Measure: cacheItemsInWatchesCountStats,
Description: "Number of items in watches on the Kubernetes API.",
Aggregation: view.Distribution(0),
Aggregation: view.Distribution(0.00001),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here. you should use the same kind of buckets. It work for our dashboard to not have bucket cause I do average mostly but if you want 99th % you can't without proper buckets.

@cyriltovena
Copy link
Collaborator

Looks good just add bucket I forgot when I created this.

Zero value cannot be used as the only value for view.Distribution().
@aLekSer aLekSer force-pushed the fix/stackdriver-distribution branch from 43e81ce to f592525 Compare April 24, 2020 13:21
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: d4013f1b-826e-4d86-8946-6e5857c86f38

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1479/head:pr_1479 && git checkout pr_1479
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-f592525

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: a01593b7-c13a-42d8-b033-c2018fb9ca62

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1479/head:pr_1479 && git checkout pr_1479
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.6.0-8ebe417

Copy link
Collaborator

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aLekSer, cyriltovena

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@markmandel markmandel added area/operations Installation, updating, metrics etc kind/bug These are bugs. labels Apr 25, 2020
@markmandel markmandel merged commit e7b92d6 into googleforgames:master Apr 25, 2020
@markmandel markmandel added this to the 1.6.0 milestone Apr 25, 2020
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
Zero value cannot be used as the only value for view.Distribution().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/operations Installation, updating, metrics etc kind/bug These are bugs. lgtm size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metrics: Export to Stackdriver is not working
5 participants