Skip to content

Commit

Permalink
Stub metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
tu55eladd committed Oct 7, 2024
1 parent e7e0b10 commit 8fa1ebf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/felles-komponenter/utils/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ interface FrontendEvent {
}

export default function loggEvent(eventNavn: string, feltObjekt?: object, tagObjekt?: object) {
if (getEnv() == Env.Local) return;
// Remove prod and dev check when metrics functional in the backend again
if ([Env.Prod.toString(), Env.Dev.toString(), Env.Local.toString()].includes(getEnv())) return;
const event: FrontendEvent = { name: eventNavn, fields: feltObjekt, tags: tagObjekt };
const url = `${AKTIVITET_BASE_URL}/logger/event`;
const config = {
Expand All @@ -25,7 +26,7 @@ export default function loggEvent(eventNavn: string, feltObjekt?: object, tagObj
method: 'post',
body: JSON.stringify(event),
};
return fetch(url, config);
return fetch(url, config);*/
}

const FORHANDSORIENTERING_LOGGEVENT = 'aktivitetsplan.forhandsorientering';
Expand Down

0 comments on commit 8fa1ebf

Please sign in to comment.