File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1919import java .util .Set ;
2020import javax .annotation .concurrent .Immutable ;
2121
22+ /**
23+ * This class holds the mapping between Google Cloud's monitored resource type and the labels for
24+ * identifying the given monitored resource type.
25+ */
2226@ Immutable
2327public final class MonitoredResourceMapping {
2428 private final String mrType ;
2529 private final Set <String > mrLabels ;
2630
31+ /**
32+ * Public constructor.
33+ *
34+ * @param mrType The monitored resource type for which the mapping is being specified.
35+ * @param mrLabels A set of labels which uniquely identify a given monitored resource.
36+ */
2737 public MonitoredResourceMapping (String mrType , Set <String > mrLabels ) {
2838 this .mrType = mrType ;
2939 this .mrLabels = mrLabels ;
3040 }
3141
42+ /**
43+ * Returns the set of labels used to identify the monitored resource represented in this mapping.
44+ *
45+ * @return Immutable set of labels that map to the specified monitored resource type.
46+ */
3247 public Set <String > getMonitoredResourceLabels () {
3348 return Collections .unmodifiableSet (mrLabels );
3449 }
3550
51+ /**
52+ * The type of the monitored resource for which mapping is defined.
53+ *
54+ * @return The type of the monitored resource.
55+ */
3656 public String getMonitoredResourceType () {
3757 return this .mrType ;
3858 }
You can’t perform that action at this time.
0 commit comments