Moving token to settings
This commit is contained in:
@@ -3,6 +3,10 @@ const {
|
||||
traces = axios.create({
|
||||
baseURL: opentelemetry_settings.baseUrl,
|
||||
timeout: 16000,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${opentelemetry_settings.token}`,
|
||||
},
|
||||
}),
|
||||
} = this;
|
||||
|
||||
@@ -87,7 +91,7 @@ return {
|
||||
value: {
|
||||
stringValue: (
|
||||
req.body?.metadata?.sessionId ?? "undefined"
|
||||
),
|
||||
).toLowerCase(),
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -147,13 +151,10 @@ return {
|
||||
},
|
||||
});
|
||||
|
||||
const response = await traces.post(`/v1/traces`, span, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
const response = await traces.post(`/v1/traces`, span);
|
||||
return response.data;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
throw e;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user