Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AggregationTemporality configurable for OtlpInMemoryMetricExporter #7904

Merged

Conversation

ptrdom
Copy link
Contributor

@ptrdom ptrdom commented Feb 24, 2023

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
Copy link

linux-foundation-easycla bot commented Feb 24, 2023

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
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
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