in exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/InternalMetricExporter.java [93:111]
static InternalMetricExporter createWithConfiguration(MetricConfiguration configuration)
throws IOException {
String projectId = configuration.getProjectId();
String prefix = configuration.getPrefix();
MetricServiceSettings serviceClientSettings =
configuration.getMetricServiceSettings() == null
? generateMetricServiceSettings(configuration)
: configuration.getMetricServiceSettings();
return new InternalMetricExporter(
projectId,
prefix,
new CloudMetricClientImpl(MetricServiceClient.create(serviceClientSettings)),
configuration.getDescriptorStrategy(),
configuration.getResourceAttributesFilter(),
configuration.getUseServiceTimeSeries(),
configuration.getMonitoredResourceDescription(),
configuration.getInstrumentationLibraryLabelsEnabled());
}