change ZipkinExporter port

This commit is contained in:
Peter Maquiran
2024-06-19 16:43:12 +01:00
parent 0d5955c9e9
commit 1ccc7a9fc9
3 changed files with 7 additions and 19 deletions
@@ -13,7 +13,7 @@ function createProvider(serviceName) {
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
provider.addSpanProcessor(new SimpleSpanProcessor(new ZipkinExporter({
url: 'http://5.180.182.151:9411/api/v2/spans',
url: 'https://5-180-182-151.cloud-xip.com:85/zipkin-endpoint/api/v2/spans',
serviceName: serviceName,
// Uncomment and customize the following if needed
// getExportRequestHeaders: () => {
@@ -95,19 +95,11 @@ export function XTracerAsync({ name, bugPrint, module = null, autoFinish = true
try {
const result = await originalMethod.apply(this, args);
if(!window.location.origin.includes('https')) {
if(autoFinish) {
tracing.finish()
}
}
tracing.finish()
return result
} catch (e) {
if(!window.location.origin.includes('https')) {
if(autoFinish) {
tracing.finish()
}
}
tracing.setAttribute('catch', 'true')
tracing.finish()
console.error(e);
return false
}
@@ -135,15 +127,12 @@ export function XTracer({ name, bugPrint, module, autoFinish = true }) {
try {
const result = originalMethod.apply(this, args);
if(!window.location.origin.includes('https')) {
tracing.finish()
}
tracing.finish()
return result
} catch (e) {
if(!window.location.origin.includes('https')) {
tracing.finish()
}
tracing.setAttribute('catch', 'true')
tracing.finish()
console.error(e);
return false
}