Skip to content

Commit

Permalink
Remove debugger statement and improve code formatting in telemetry in…
Browse files Browse the repository at this point in the history
…gestion
  • Loading branch information
simlarsen committed Dec 6, 2024
1 parent dc5e2c0 commit 7f6223f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Common/Server/Middleware/TelemetryIngest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export default class TelemetryIngest {
try {
// check header.

debugger;

let oneuptimeToken: string | undefined = req.headers[
"x-oneuptime-token"
] as string | undefined;
Expand Down
12 changes: 9 additions & 3 deletions OpenTelemetryIngest/API/OTelIngest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ router.post(
// get service name from resourceSpan attributes

const serviceName: string = getServiceNameFromAttributes(
(resourceSpan["resource"] as JSONObject)?.["attributes"] as JSONArray || [],
((resourceSpan["resource"] as JSONObject)?.[
"attributes"
] as JSONArray) || [],
);

if (!serviceDictionary[serviceName]) {
Expand Down Expand Up @@ -451,7 +453,9 @@ router.post(
// get service name from resourceMetric attributes

const serviceName: string = getServiceNameFromAttributes(
(resourceMetric["resource"] as JSONObject)?.["attributes"] as JSONArray || [],
((resourceMetric["resource"] as JSONObject)?.[
"attributes"
] as JSONArray) || [],
);

if (!serviceDictionary[serviceName]) {
Expand Down Expand Up @@ -728,7 +732,9 @@ router.post(
// get service name from resourceLog attributes

const serviceName: string = getServiceNameFromAttributes(
(resourceLog["resource"] as JSONObject)?.["attributes"] as JSONArray || [],
((resourceLog["resource"] as JSONObject)?.[
"attributes"
] as JSONArray) || [],
);

if (!serviceDictionary[serviceName]) {
Expand Down

0 comments on commit 7f6223f

Please sign in to comment.