Skip to content

Commit

Permalink
Add null check for meter
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiscigl committed Jul 14, 2023
1 parent fb35c49 commit 153407a
Show file tree
Hide file tree
Showing 356 changed files with 53,991 additions and 27,028 deletions.

Large diffs are not rendered by default.

168 changes: 112 additions & 56 deletions generated/src/aws-cpp-sdk-accessanalyzer/source/AccessAnalyzerClient.cpp

Large diffs are not rendered by default.

54 changes: 36 additions & 18 deletions generated/src/aws-cpp-sdk-account/source/AccountClient.cpp

Large diffs are not rendered by default.

138 changes: 92 additions & 46 deletions generated/src/aws-cpp-sdk-acm-pca/source/ACMPCAClient.cpp

Large diffs are not rendered by default.

91 changes: 61 additions & 30 deletions generated/src/aws-cpp-sdk-acm/source/ACMClient.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ SendAnnouncementOutcome AlexaForBusinessClient::SendAnnouncement(const SendAnnou
AWS_OPERATION_CHECK_PTR(m_endpointProvider, SendAnnouncement, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE);
AWS_OPERATION_CHECK_PTR(m_telemetryProvider, SendAnnouncement, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {});
auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {});
AWS_OPERATION_CHECK_PTR(meter, SendAnnouncement, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".SendAnnouncement",
{{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }},
smithy::components::tracing::SpanKind::CLIENT);
Expand All @@ -169,13 +171,13 @@ SendAnnouncementOutcome AlexaForBusinessClient::SendAnnouncement(const SendAnnou
auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming<ResolveEndpointOutcome>(
[&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); },
TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC,
*m_telemetryProvider->getMeter(this->GetServiceClientName(), {}),
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, SendAnnouncement, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage());
return SendAnnouncementOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
*m_telemetryProvider->getMeter(this->GetServiceClientName(), {}),
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
}

126 changes: 84 additions & 42 deletions generated/src/aws-cpp-sdk-amp/source/PrometheusServiceClient.cpp

Large diffs are not rendered by default.

222 changes: 148 additions & 74 deletions generated/src/aws-cpp-sdk-amplify/source/AmplifyClient.cpp

Large diffs are not rendered by default.

186 changes: 124 additions & 62 deletions generated/src/aws-cpp-sdk-amplifybackend/source/AmplifyBackendClient.cpp

Large diffs are not rendered by default.

Large diffs are not rendered by default.

720 changes: 480 additions & 240 deletions generated/src/aws-cpp-sdk-apigateway/source/APIGatewayClient.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ DeleteConnectionOutcome ApiGatewayManagementApiClient::DeleteConnection(const De
}
AWS_OPERATION_CHECK_PTR(m_telemetryProvider, DeleteConnection, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {});
auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {});
AWS_OPERATION_CHECK_PTR(meter, DeleteConnection, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".DeleteConnection",
{{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }},
smithy::components::tracing::SpanKind::CLIENT);
Expand All @@ -176,15 +178,15 @@ DeleteConnectionOutcome ApiGatewayManagementApiClient::DeleteConnection(const De
auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming<ResolveEndpointOutcome>(
[&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); },
TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC,
*m_telemetryProvider->getMeter(this->GetServiceClientName(), {}),
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, DeleteConnection, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage());
endpointResolutionOutcome.GetResult().AddPathSegments("/@connections/");
endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConnectionId());
return DeleteConnectionOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
*m_telemetryProvider->getMeter(this->GetServiceClientName(), {}),
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
}

Expand All @@ -199,6 +201,8 @@ GetConnectionOutcome ApiGatewayManagementApiClient::GetConnection(const GetConne
}
AWS_OPERATION_CHECK_PTR(m_telemetryProvider, GetConnection, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {});
auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {});
AWS_OPERATION_CHECK_PTR(meter, GetConnection, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".GetConnection",
{{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }},
smithy::components::tracing::SpanKind::CLIENT);
Expand All @@ -207,15 +211,15 @@ GetConnectionOutcome ApiGatewayManagementApiClient::GetConnection(const GetConne
auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming<ResolveEndpointOutcome>(
[&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); },
TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC,
*m_telemetryProvider->getMeter(this->GetServiceClientName(), {}),
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, GetConnection, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage());
endpointResolutionOutcome.GetResult().AddPathSegments("/@connections/");
endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConnectionId());
return GetConnectionOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
*m_telemetryProvider->getMeter(this->GetServiceClientName(), {}),
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
}

Expand All @@ -230,6 +234,8 @@ PostToConnectionOutcome ApiGatewayManagementApiClient::PostToConnection(const Po
}
AWS_OPERATION_CHECK_PTR(m_telemetryProvider, PostToConnection, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto tracer = m_telemetryProvider->getTracer(this->GetServiceClientName(), {});
auto meter = m_telemetryProvider->getMeter(this->GetServiceClientName(), {});
AWS_OPERATION_CHECK_PTR(meter, PostToConnection, CoreErrors, CoreErrors::NOT_INITIALIZED);
auto span = tracer->CreateSpan(Aws::String(this->GetServiceClientName()) + ".PostToConnection",
{{ TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName() }, { TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName() }, { TracingUtils::SMITHY_SYSTEM_DIMENSION, TracingUtils::SMITHY_METHOD_AWS_VALUE }},
smithy::components::tracing::SpanKind::CLIENT);
Expand All @@ -238,15 +244,15 @@ PostToConnectionOutcome ApiGatewayManagementApiClient::PostToConnection(const Po
auto endpointResolutionOutcome = TracingUtils::MakeCallWithTiming<ResolveEndpointOutcome>(
[&]() -> ResolveEndpointOutcome { return m_endpointProvider->ResolveEndpoint(request.GetEndpointContextParams()); },
TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC,
*m_telemetryProvider->getMeter(this->GetServiceClientName(), {}),
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
AWS_OPERATION_CHECK_SUCCESS(endpointResolutionOutcome, PostToConnection, CoreErrors, CoreErrors::ENDPOINT_RESOLUTION_FAILURE, endpointResolutionOutcome.GetError().GetMessage());
endpointResolutionOutcome.GetResult().AddPathSegments("/@connections/");
endpointResolutionOutcome.GetResult().AddPathSegment(request.GetConnectionId());
return PostToConnectionOutcome(MakeRequest(request, endpointResolutionOutcome.GetResult(), Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
},
TracingUtils::SMITHY_CLIENT_DURATION_METRIC,
*m_telemetryProvider->getMeter(this->GetServiceClientName(), {}),
*meter,
{{TracingUtils::SMITHY_METHOD_DIMENSION, request.GetServiceRequestName()}, {TracingUtils::SMITHY_SERVICE_DIMENSION, this->GetServiceClientName()}});
}

Loading

0 comments on commit 153407a

Please sign in to comment.