mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
add monitoring
This commit is contained in:
@@ -19,6 +19,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
|
||||
import { isHttpError } from 'src/app/services/http.service';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-approve-event',
|
||||
@@ -61,7 +62,8 @@ export class ApproveEventPage implements OnInit {
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
public TaskService: TaskService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
public AgendaDataRepositoryService: AgendaDataRepositoryService
|
||||
public AgendaDataRepositoryService: AgendaDataRepositoryService,
|
||||
public EventsService: EventsService
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
//
|
||||
@@ -111,6 +113,14 @@ export class ApproveEventPage implements OnInit {
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
} else if(isHttpError(res.error)) {
|
||||
|
||||
tracing.setAttribute('eventId', this.serialNumber)
|
||||
|
||||
if(res.error.status == 404) {
|
||||
this.toastService._badRequest('Este evento já não existe')
|
||||
} else {
|
||||
this.httpErrorHandle.httpStatusHandle(res.error)
|
||||
}
|
||||
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing.bugFlag()
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ export class EventListPage implements OnInit {
|
||||
let allEvents = await this.AgendaDataRepositoryService.eventToApproveList({
|
||||
userId,
|
||||
status: EEventFilterStatus.Pending
|
||||
})
|
||||
}, tracing)
|
||||
|
||||
if(allEvents.isOk()) {
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
|
||||
Reference in New Issue
Block a user