Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server monitoring 'debug' method is not working #26

Open
kkiaune opened this issue Aug 25, 2023 · 0 comments
Open

Server monitoring 'debug' method is not working #26

kkiaune opened this issue Aug 25, 2023 · 0 comments

Comments

@kkiaune
Copy link

kkiaune commented Aug 25, 2023

As the title says ServerMonitoring.debug does not log anything to Datadog.

Steps to reproduce

  1. initialize ServerMonitoringService
// monitoring.ts
import { ServerMonitoringService } from '@kilohealth/web-app-monitoring/dist/server';

export const Monitoring = new ServerMonitoringService({
  authToken: '',
  serviceName: '',
  serviceVersion: '',
  serviceEnv: '',
});
  1. create a page with getServerSideProps
// pages/random.ts
import { GetServerSideProps, NextPage } from 'next';
import { Monitoring } from '../monitoring';

const RandomPage: NextPage = () => (<div>This is random page</div>);

export const getServerSideProps: GetServerSideProps = async () => {

  return {
    props: {...}
  }
};

export default RandomPage;
  1. add all possible methods implementations
...

export const getServerSideProps: GetServerSideProps = async () => {
  Monitoring.debug('getServerSideProps debug');
  Monitoring.error('getServerSideProps error');
  Monitoring.info('getServerSideProps info');
  Monitoring.warn('getServerSideProps warn');

  ...
};

...
  1. check datadog
    image

all methods are logged except the debug one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant