add tracing tags

This commit is contained in:
Peter Maquiran
2024-07-31 09:35:35 +01:00
parent edcaf951c2
commit 2d2f00cb4c
9 changed files with 51 additions and 53 deletions
@@ -27,6 +27,7 @@ import { DocumentViewerOptionService } from "src/app/services/document-viewer-op
import { fromEvent, merge, interval, Subscription } from 'rxjs';
import { takeUntil, filter, switchMap, take } from 'rxjs/operators';
import { DespachosOptionsPage } from 'src/app/shared/popover/despachos-options/despachos-options.page';
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
@Component({
selector: 'app-despacho',
@@ -214,10 +215,15 @@ export class DespachoPage implements OnInit {
this.mergedArray.push(docObject);
});
}
getDraft(split_stringDraft: string[]) {
@XTracerAsync({name:'task/getDraft', bugPrint: true})
getDraft(split_stringDraft: string[], tracing?: TracingType) {
split_stringDraft.forEach(element => {
// console.log('List of ids', element)
tracing.addEvent('start GetDraftByID')
this.processes.GetDraftByID(element).subscribe((resd) => {
tracing.addEvent('end GetDraftByID')
tracing.setAttribute('sdfsdf', 'asdfsfd');
let object = {
"ApplicationId": "",
"Assunto": resd.data.description,
@@ -235,6 +241,8 @@ export class DespachoPage implements OnInit {
}
this.mergedArray.push(object)
// console.log('List of draff', resd)
}, (error) => {
console.log(error)
})
});
@@ -22,6 +22,7 @@ import { TaskService } from 'src/app/services/task.service'
import { TinyMCEPage } from 'src/app/tiny-mce/tiny-mce.page';
import { DespachosPrOptionsPage } from 'src/app/shared/popover/despachos-pr-options/despachos-pr-options.page';
import { DiplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
import { TracingType, XTracerAsync } from 'src/app/services/monitoring/opentelemetry/tracer';
@Component({
@@ -541,7 +542,9 @@ export class DiplomaPage implements OnInit {
this.mergedArray.push(docObject);
});
}
async getDraft(split_stringDraft: string[]) {
@XTracerAsync({name:'task/getDraft', bugPrint: true})
async getDraft(split_stringDraft: string[], tracing?: TracingType) {
this.DraftNames = ""
for(const strg of split_stringDraft) {