When running the auto-instrumentation-example, service_name appears under metric labels on GCP console with the expected value.
When running the metric export example, service_name appears with unknown_resource since the example does not include resource detection.
Deprecation
Deprecates the current publicly available AggregateByLabelMetricTimeSeriesBuilder constructor in favor of one that also accepts a resource attribute filter in form of a predicate. The existing constructor uses the NO_RESOURCE_ATTRIBUTES to keep it in-line with the existing functionality.
Feature Addition
service.name
,service.namespace
andservice.id
resource attributes to metric labels.NO_RESOURCE_ATTRIBUTES
as the resource filter to theMetricConfiguration
object.DEFAULT_RESOURCE_ATTRIBUTES_FILTER
.Note: This is similar to how the Google Cloud Monitoring go exporter works.
Testing
service_name
appears under metric labels on GCP console with the expected value.service_name
appears withunknown_resource
since the example does not include resource detection.Deprecation
AggregateByLabelMetricTimeSeriesBuilder
constructor in favor of one that also accepts a resource attribute filter in form of a predicate. The existing constructor uses theNO_RESOURCE_ATTRIBUTES
to keep it in-line with the existing functionality.fixes #313