Skip to content

Commit

Permalink
feature: add simple execute trace to asp
Browse files Browse the repository at this point in the history
  • Loading branch information
dhenkel92 committed May 4, 2024
1 parent 75fab85 commit bda5f99
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import GameDeploymentRepository from '../repositories/GameDeploymentRepository';
import { TerraformService } from './TerraformService';
import { HetznerCloudRepository } from '../repositories/HetznerCloudRepository';
import { GameDeploymentStatus, generateTFWorkspaceName } from '../entities/GameDeployment';
import tracer = require('dd-trace');

export interface GameDeploymentServiceConfig {
timeoutMillis?: number;
Expand Down Expand Up @@ -30,7 +31,9 @@ export class GameDeploymentService {

while (this.isRunning) {
try {
await this.execute();
await tracer.trace('execute', { resource: 'execute' }, async () => {
await this.execute();
});
} catch (e) {
this.logger.error('Error while processing message %s', e);
}
Expand Down

0 comments on commit bda5f99

Please sign in to comment.