{"action":"created","issue":{"url":"https://api.github.com/repos/census-ecosystem/opencensus-go-exporter-stackdriver/issues/31","repository_url":"https://api.github.com/repos/census-ecosystem/opencensus-go-exporter-stackdriver","labels_url":"https://api.github.com/repos/census-ecosystem/opencensus-go-exporter-stackdriver/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/census-ecosystem/opencensus-go-exporter-stackdriver/issues/31/comments","events_url":"https://api.github.com/repos/census-ecosystem/opencensus-go-exporter-stackdriver/issues/31/events","html_url":"https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/issues/31","id":350307006,"node_id":"MDU6SXNzdWUzNTAzMDcwMDY=","number":31,"title":"LastValue exported as aggregation and not as gauge","user":{"login":"riaan53","id":7716342,"node_id":"MDQ6VXNlcjc3MTYzNDI=","avatar_url":"https://avatars2.githubusercontent.com/u/7716342?v=4","gravatar_id":"","url":"https://api.github.com/users/riaan53","html_url":"https://github.com/riaan53","followers_url":"https://api.github.com/users/riaan53/followers","following_url":"https://api.github.com/users/riaan53/following{/other_user}","gists_url":"https://api.github.com/users/riaan53/gists{/gist_id}","starred_url":"https://api.github.com/users/riaan53/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riaan53/subscriptions","organizations_url":"https://api.github.com/users/riaan53/orgs","repos_url":"https://api.github.com/users/riaan53/repos","events_url":"https://api.github.com/users/riaan53/events{/privacy}","received_events_url":"https://api.github.com/users/riaan53/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-14T07:13:36Z","updated_at":"2018-08-14T13:17:37Z","closed_at":"2018-08-14T13:17:37Z","author_association":"NONE","body":"Hi,\r\n\r\nIm pretty sure im doing something wrong but cant seem to get it to export as gauge. \r\n\r\nVersions:\r\n```\r\nLocking in v0.14.0 (e262766) for direct dep go.opencensus.io\r\nLocking in v0.5.0 (37aa280) for transitive dep contrib.go.opencensus.io/exporter/stackdriver\r\n```\r\n\r\nSample:\r\n```golang\r\npackage main\r\n\r\nimport (\r\n\t\"context\"\r\n\t\"fmt\"\r\n\t\"log\"\r\n\t\"time\"\r\n\r\n\t\"go.opencensus.io/exporter/stackdriver\"\r\n\t\"go.opencensus.io/stats\"\r\n\t\"go.opencensus.io/stats/view\"\r\n)\r\n\r\nvar (\r\n\tnumOpenMeasure = stats.Int64(\"opencensus.io/test/num_open_test_measure_v3\", \"Number open connections\", stats.UnitDimensionless)\r\n)\r\n\r\nfunc main() {\r\n\texporter, err := stackdriver.NewExporter(stackdriver.Options{\r\n\t\tProjectID: \"xxx\"})\r\n\r\n\tif err != nil {\r\n\t\tlog.Fatalln(err)\r\n\t}\r\n\r\n\tview.RegisterExporter(exporter)\r\n\r\n\tnumOpenView := &view.View{\r\n\t\tName:        \"opencensus.io/test/num_open_test_view_v3\",\r\n\t\tDescription: \"Number open connections\",\r\n\t\tMeasure:     numOpenMeasure,\r\n\t\tAggregation: view.LastValue(),\r\n\t}\r\n\r\n\tif err := view.Register(\r\n\t\tnumOpenView,\r\n\t); err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\r\n\tnumOpen := int64(50)\r\n\r\n\tfor {\r\n\t\tstats.Record(context.Background(), numOpenMeasure.M(numOpen))\r\n\t\tfmt.Println(\"Num open: \", numOpen)\r\n\t\ttime.Sleep(5 * time.Second)\r\n\t\tnumOpen++\r\n\t}\r\n}\r\n```\r\n\r\nStackdriver:\r\n<img width=\"869\" alt=\"screen shot 2018-08-14 at 09 10 22\" src=\"https://user-images.githubusercontent.com/7716342/44076843-f1722cee-9fa1-11e8-908c-b8152a404bf2.png\">\r\n\r\nAny ideas?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/census-ecosystem/opencensus-go-exporter-stackdriver/issues/comments/412868246","html_url":"https://github.com/census-ecosystem/opencensus-go-exporter-stackdriver/issues/31#issuecomment-412868246","issue_url":"https://api.github.com/repos/census-ecosystem/opencensus-go-exporter-stackdriver/issues/31","id":412868246,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjg2ODI0Ng==","user":{"login":"riaan53","id":7716342,"node_id":"MDQ6VXNlcjc3MTYzNDI=","avatar_url":"https://avatars2.githubusercontent.com/u/7716342?v=4","gravatar_id":"","url":"https://api.github.com/users/riaan53","html_url":"https://github.com/riaan53","followers_url":"https://api.github.com/users/riaan53/followers","following_url":"https://api.github.com/users/riaan53/following{/other_user}","gists_url":"https://api.github.com/users/riaan53/gists{/gist_id}","starred_url":"https://api.github.com/users/riaan53/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riaan53/subscriptions","organizations_url":"https://api.github.com/users/riaan53/orgs","repos_url":"https://api.github.com/users/riaan53/repos","events_url":"https://api.github.com/users/riaan53/events{/privacy}","received_events_url":"https://api.github.com/users/riaan53/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T13:17:37Z","updated_at":"2018-08-14T13:17:37Z","author_association":"NONE","body":"Fixing my import paths to `contrib.go.opencensus.io` and adding the monitoredresource.Autodetect() stackdrvier option solves the problem."}}
{"actor":{"display_login":"riaan53"}}