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

Refactor metric format #2658

Merged
merged 16 commits into from
May 12, 2022
Prev Previous commit
Next Next commit
Remove instrumentation_scope check
  • Loading branch information
ocelotl committed May 12, 2022
commit 436dfff9cb18928f287db51dbea37ab2d4503621
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,16 @@ def _translate_data(
instrumentation_scope_pb2_scope_metrics
):

if instrumentation_scope is None:
instrumentation_scope_pb2_scope_metrics[
None
] = pb2.ScopeMetrics()

else:
instrumentation_scope_pb2_scope_metrics[
instrumentation_scope
] = pb2.ScopeMetrics(
scope=InstrumentationScope(
name=instrumentation_scope.name,
version=instrumentation_scope.version,
)
# instrumentation_scope comes from the meter, it is never
# None.
instrumentation_scope_pb2_scope_metrics[
instrumentation_scope
] = pb2.ScopeMetrics(
scope=InstrumentationScope(
name=instrumentation_scope.name,
version=instrumentation_scope.version,
)
)

pb2_scope_metrics = instrumentation_scope_pb2_scope_metrics[
instrumentation_scope
Expand Down