Skip to content

Commit

Permalink
chore: fix otel trace spans being wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
uptickmetachu committed Dec 5, 2024
1 parent 939b9ea commit ca6aec1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions gitops_server/workers/deployer/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,12 @@ async def uninstall_app(self, app: App) -> UpdateAppResult:
return update_result

async def update_app_deployment(self, app: App) -> UpdateAppResult | None:
with tracer.start_as_current_span("update_app_deployment", attributes={"app": app.name}) as span:
app.set_value("deployment.labels.gitops/deploy_id", self.deploy_id)
app.set_value("deployment.labels.gitops/status", github.STATUSES.in_progress)
if github_deployment_url := app.values.get("github/deployment_url"):
app.set_value("deployment.annotations.github/deployment_url", github_deployment_url)

async with self.semaphore:
app.set_value("deployment.labels.gitops/deploy_id", self.deploy_id)
app.set_value("deployment.labels.gitops/status", github.STATUSES.in_progress)
if github_deployment_url := app.values.get("github/deployment_url"):
app.set_value("deployment.annotations.github/deployment_url", github_deployment_url)
async with self.semaphore:
with tracer.start_as_current_span("update_app_deployment", attributes={"app": app.name}) as span:
logger.info(f"Deploying app {app.name!r}.")
from_timestamp = time.time()
if app.chart.type == "git":
Expand Down

0 comments on commit ca6aec1

Please sign in to comment.