Skip to content

Make AggregationTemporality configurable for OtlpInMemoryMetricExporter#7904

Merged
trask merged 4 commits into
open-telemetry:mainfrom
ptrdom:agent-for-testing-temporality-config
Feb 27, 2023
Merged

Make AggregationTemporality configurable for OtlpInMemoryMetricExporter#7904
trask merged 4 commits into
open-telemetry:mainfrom
ptrdom:agent-for-testing-temporality-config

Conversation

@ptrdom

@ptrdom ptrdom commented Feb 24, 2023

Copy link
Copy Markdown
Contributor

References #7902.

Not sure if system property name is the most appropriate or if any tests are required for these changes.

@ptrdom ptrdom requested a review from a team February 24, 2023 13:04
@linux-foundation-easycla

linux-foundation-easycla Bot commented Feb 24, 2023

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ptrdom / name: Domantas Petrauskas (231b5dc)

@ptrdom ptrdom force-pushed the agent-for-testing-temporality-config branch from 231b5dc to f2520c3 Compare February 24, 2023 13:13

private final Queue<byte[]> collectedRequests = new ConcurrentLinkedQueue<>();

private final AggregationTemporality aggregationTemporality;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be static, e.g.

Suggested change
private final AggregationTemporality aggregationTemporality;
private static final AggregationTemporality aggregationTemporality = initAggregationTemporality();

@mateuszrzeszutek mateuszrzeszutek linked an issue Feb 24, 2023 that may be closed by this pull request
@ptrdom ptrdom force-pushed the agent-for-testing-temporality-config branch from f74723c to 62850f2 Compare February 26, 2023 19:54
@ptrdom ptrdom force-pushed the agent-for-testing-temporality-config branch from 62850f2 to 5a63914 Compare February 26, 2023 20:02
@ptrdom ptrdom requested a review from trask February 26, 2023 20:33
if (temporalityProperty == null) {
aggregationTemporality = AggregationTemporality.DELTA;
} else {
aggregationTemporality = AggregationTemporality.valueOf(temporalityProperty.toUpperCase());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use toUpperCase(Locale.ROOT)

@trask trask enabled auto-merge (squash) February 27, 2023 16:51
@trask trask merged commit 2a20f5e into open-telemetry:main Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable AggregationTemporality for agent-for-testing

3 participants