Skip to content

Commit

Permalink
Merge branch 'main' into renovate/axios-1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
pichlermarc authored Aug 29, 2023
2 parents 3e50580 + a793321 commit afe4e5f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/
### :rocket: (Enhancement)

* feat(sdk-metrics): implement MetricProducer specification [#4007](https://github.com/open-telemetry/opentelemetry-js/pull/4007)
* feat: update PeriodicExportingMetricReader and PrometheusExporter to accept optional metric producers [#4077](https://github.com/open-telemetry/opentelemetry-js/pull/4077) @aabmass

### :bug: (Bug Fix)

Expand Down
2 changes: 2 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ All notable changes to experimental packages in this project will be documented

### :rocket: (Enhancement)

* feat: update PeriodicExportingMetricReader and PrometheusExporter to accept optional metric producers [#4077](https://github.com/open-telemetry/opentelemetry-js/pull/4077) @aabmass

### :bug: (Bug Fix)

### :books: (Refine Doc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class PrometheusExporter extends MetricReader {
aggregationSelector: _instrumentType => Aggregation.Default(),
aggregationTemporalitySelector: _instrumentType =>
AggregationTemporality.CUMULATIVE,
metricProducers: config.metricProducers,
});
this._host =
config.host ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import { MetricProducer } from '@opentelemetry/sdk-metrics';

/**
* Configuration interface for prometheus exporter
*/
Expand Down Expand Up @@ -56,4 +58,12 @@ export interface ExporterConfig {
* @default false
*/
preventServerStart?: boolean;

/**
* **Note, this option is experimental**. Additional MetricProducers to use as a source of
* aggregated metric data in addition to the SDK's metric data. The resource returned by
* these MetricProducers is ignored; the SDK's resource will be used instead.
* @experimental
*/
metricProducers?: MetricProducer[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { MetricReader } from './MetricReader';
import { PushMetricExporter } from './MetricExporter';
import { callWithTimeout, TimeoutError } from '../utils';
import { diag } from '@opentelemetry/api';
import { MetricProducer } from './MetricProducer';

export type PeriodicExportingMetricReaderOptions = {
/**
Expand All @@ -40,6 +41,13 @@ export type PeriodicExportingMetricReaderOptions = {
* Milliseconds for the async observable callback to timeout.
*/
exportTimeoutMillis?: number;
/**
* **Note, this option is experimental**. Additional MetricProducers to use as a source of
* aggregated metric data in addition to the SDK's metric data. The resource returned by
* these MetricProducers is ignored; the SDK's resource will be used instead.
* @experimental
*/
metricProducers?: MetricProducer[];
};

/**
Expand All @@ -59,6 +67,7 @@ export class PeriodicExportingMetricReader extends MetricReader {
),
aggregationTemporalitySelector:
options.exporter.selectAggregationTemporality?.bind(options.exporter),
metricProducers: options.metricProducers,
});

if (
Expand Down
7 changes: 1 addition & 6 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,9 @@
{
"matchPackageNames": ["typescript", "webpack", "webpack-cli"],
"dependencyDashboardApproval": true
},
{
"matchPaths": ["experimental/backwards-compatibility/**"],
"matchPackageNames": ["@types/node"],
"enabled": false
}
],
"ignoreDeps": ["@opentelemetry/api", "@opentelemetry/resources_1.9.0"],
"ignoreDeps": ["@opentelemetry/api", "@opentelemetry/resources_1.9.0", "@types/node"],
"assignees": ["@blumamir", "@dyladan", "@legendecas", "@pichlermarc"],
"labels": ["dependencies"]
}

0 comments on commit afe4e5f

Please sign in to comment.