This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove outdated option GetMonitoredResource (#186)
- Loading branch information
Showing
3 changed files
with
0 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b0cbe77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@songy23 Is there a recommended alternative or upgrade path for code that was making use of this option? Specifically, it's being used in the knative project:
https://github.com/knative/pkg/blob/6b1c5cf09af549d89344672045b7fe0e3280a820/metrics/stackdriver_exporter.go#L72
b0cbe77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using resource.Detector and removing resource labels from view.tags.
/cc @rghetia
b0cbe77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@garron were you able to use resource.Detector to achieve the same result?
b0cbe77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestions! I haven't had a chance to try it out.
b0cbe77
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resource.Detector doesn't work for us. In our process, we could send metrics to different monitored resource types. The resource type is determined by the metric name currently. If the metric is a built-in metric, we send it with a non-global resource type. If not, we send it with global resource type as custom metrics.