Skip to content

Commit

Permalink
handle payments service
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis committed Nov 13, 2024
1 parent 46d0b2a commit 285bfc1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
HealthMixinMixin,
)
from servicelib.fastapi.httpx_utils import to_curl_command
from servicelib.fastapi.tracing import setup_httpx_client_tracing
from simcore_service_payments.models.schemas.acknowledgements import (
AckPaymentWithPaymentMethod,
)
Expand Down Expand Up @@ -216,5 +217,7 @@ def setup_payments_gateway(app: FastAPI):
secret=settings.PAYMENTS_GATEWAY_API_SECRET.get_secret_value()
),
)
if settings.PAYMENTS_TRACING:
setup_httpx_client_tracing(api.client)
api.attach_lifespan_to(app)
api.set_to_app_state(app)
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
BaseHTTPApi,
HealthMixinMixin,
)
from servicelib.fastapi.tracing import setup_httpx_client_tracing

from ..core.settings import ApplicationSettings

Expand Down Expand Up @@ -73,5 +74,7 @@ def setup_resource_usage_tracker(app: FastAPI):
api = ResourceUsageTrackerApi.from_client_kwargs(
base_url=settings.PAYMENTS_RESOURCE_USAGE_TRACKER.base_url,
)
if settings.PAYMENTS_TRACING:
setup_httpx_client_tracing(api.client)
api.set_to_app_state(app)
api.attach_lifespan_to(app)
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
BaseHTTPApi,
HealthMixinMixin,
)
from servicelib.fastapi.tracing import setup_httpx_client_tracing

from ..core.errors import StripeRuntimeError
from ..core.settings import ApplicationSettings
Expand Down Expand Up @@ -91,6 +92,8 @@ def setup_stripe(app: FastAPI):
base_url=settings.PAYMENTS_STRIPE_URL,
auth=_StripeBearerAuth(settings.PAYMENTS_STRIPE_API_SECRET.get_secret_value()),
)
if settings.PAYMENTS_TRACING:
setup_httpx_client_tracing(api.client)

api.set_to_app_state(app)
api.attach_lifespan_to(app)

0 comments on commit 285bfc1

Please sign in to comment.