Skip to content

Add metric support for grpc - #5923

Merged
trask merged 2 commits into
open-telemetry:mainfrom
jack-berg:grpc-metrics
Apr 25, 2022
Merged

Add metric support for grpc#5923
trask merged 2 commits into
open-telemetry:mainfrom
jack-berg:grpc-metrics

Conversation

@jack-berg

Copy link
Copy Markdown
Member

Was surprised to learn that gRPC metrics weren't already enabled. Any reason not to enable them?

@jack-berg
jack-berg requested a review from a team April 22, 2022 22:45

testSpanExporter = InMemorySpanExporter.create();
testMetricExporter = InMemoryMetricExporter.create();
testMetricExporter = InMemoryMetricExporter.create(AggregationTemporality.DELTA);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Cumulative metrics are a bad fit for tests. We have a shard instance of the SDK for all tests. If temporality is cumulative, then metrics that initially received measurements for one test will continue to report for the remaining tests. The result is very cumbersome to assert against and debug.

@trask trask left a comment

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.

📈

@trask
trask merged commit 6fe3299 into open-telemetry:main Apr 25, 2022
@Override
public AggregationTemporality getAggregationTemporality(InstrumentType instrumentType) {
return AggregationTemporality.CUMULATIVE;
return AggregationTemporality.DELTA;

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.

RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
* Add metric support for grpc

* Spotless
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.

4 participants